From 002cf4de32db979d515c2a9cdcd8c8f42859a797 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 9 Feb 2011 18:11:24 +0100 Subject: Add hamlet templates and restructure tests --- tests/TestSuite/Util.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/TestSuite/Util.hs (limited to 'tests/TestSuite') diff --git a/tests/TestSuite/Util.hs b/tests/TestSuite/Util.hs new file mode 100644 index 0000000..66f101e --- /dev/null +++ b/tests/TestSuite/Util.hs @@ -0,0 +1,18 @@ +-- | Test utilities +-- +module TestSuite.Util + ( fromAssertions + ) where + +import Test.Framework +import Test.Framework.Providers.HUnit +import Test.HUnit hiding (Test) + +import Hakyll.Core.Identifier.Pattern + +fromAssertions :: String -- ^ Name + -> [Assertion] -- ^ Cases + -> [Test] -- ^ Result tests +fromAssertions name = zipWith testCase names + where + names = map (\n -> name ++ " [" ++ show n ++ "]") [1 :: Int ..] -- cgit v1.2.3