2020-12-13 20:09:23 +01:00
|
|
|
{-# LANGUAGE NamedFieldPuns #-}
|
2023-08-20 22:24:58 +02:00
|
|
|
module Utils
|
|
|
|
( labeled
|
|
|
|
, testDataPath
|
|
|
|
, testGroup ) where
|
2020-12-13 20:09:23 +01:00
|
|
|
|
|
|
|
import System.FilePath ((</>))
|
2023-08-20 22:24:58 +02:00
|
|
|
import Test.HUnit (Test(..))
|
2020-12-13 20:09:23 +01:00
|
|
|
|
|
|
|
testDataPath :: FilePath -> FilePath
|
|
|
|
testDataPath = ("test" </>)
|
2023-08-20 22:24:58 +02:00
|
|
|
|
|
|
|
testGroup :: String -> [Test] -> Test
|
|
|
|
testGroup name = TestLabel name . TestList
|
|
|
|
|
|
|
|
labeled :: [(String, Test)] -> [Test]
|
|
|
|
labeled = fmap (uncurry TestLabel)
|