test-framework 0.6.2 → 0.7.0
raw patch · 3 files changed
+7/−4 lines, 3 files
Files
Test/Framework/Core.hs view
@@ -1,10 +1,11 @@-{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE UndecidableInstances, DeriveDataTypeable #-} module Test.Framework.Core where import Test.Framework.Improving import Test.Framework.Options import Control.Concurrent.MVar+import Data.Typeable -- | Something like the result of a test: works in concert with 'Testlike'.@@ -35,7 +36,8 @@ -- -- For an example of how to use test-framework, please see -- <http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs>-data Test = forall i r t. Testlike i r t => Test TestName t -- ^ A single test of some particular type+data Test = forall i r t.+ (Testlike i r t, Typeable t) => Test TestName t -- ^ A single test of some particular type | TestGroup TestName [Test] -- ^ Assemble a number of tests into a cohesive group | PlusTestOptions TestOptions Test -- ^ Add some options to child tests | BuildTest (IO Test) -- ^ Convenience for creating tests from an 'IO' action@@ -54,6 +56,7 @@ data MutuallyExcluded t = ME (MVar ()) t+ deriving Typeable -- This requires UndecidableInstances, but I think it can't be made inconsistent? instance Testlike i r t => Testlike i r (MutuallyExcluded t) where
Test/Framework/Runners/Console.hs view
@@ -167,7 +167,7 @@ showTest path (Test name _testlike) = [" "++path ++ name] showTest path (TestGroup name tests) = concatMap (showTest (path++":"++name)) tests showTest path (PlusTestOptions _ test) = showTest path test- showTest path (BuildTest build) = []+ showTest _ (BuildTest _) = [] completeRunnerOptions :: RunnerOptions -> CompleteRunnerOptions
test-framework.cabal view
@@ -1,5 +1,5 @@ Name: test-framework-Version: 0.6.2+Version: 0.7.0 Cabal-Version: >= 1.2.3 Category: Testing Synopsis: Framework for running and organising tests, with HUnit and QuickCheck support