hablo/test/Utils.hs
2023-08-20 22:35:03 +02:00

17 lines
379 B
Haskell

{-# LANGUAGE NamedFieldPuns #-}
module Utils
( labeled
, testDataPath
, testGroup ) where
import System.FilePath ((</>))
import Test.HUnit (Test(..))
testDataPath :: FilePath -> FilePath
testDataPath = ("test" </>)
testGroup :: String -> [Test] -> Test
testGroup name = TestLabel name . TestList
labeled :: [(String, Test)] -> [Test]
labeled = fmap (uncurry TestLabel)