hakyll/tests/TestSuite/Util.hs
2011-02-23 13:56:13 +01:00

16 lines
425 B
Haskell

-- | Test utilities
--
module TestSuite.Util
( fromAssertions
) where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test)
fromAssertions :: String -- ^ Name
-> [Assertion] -- ^ Cases
-> [Test] -- ^ Result tests
fromAssertions name = zipWith testCase names
where
names = map (\n -> name ++ " [" ++ show n ++ "]") [1 :: Int ..]