File: Test.hs

package info (click to toggle)
haskell-utility-ht 0.0.14-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 252 kB
  • sloc: haskell: 1,743; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module Main where

import qualified Test.Data.List.Reverse.StrictElement as RevElem
import qualified Test.Data.List.Reverse.StrictSpine as RevSpine
import qualified Test.Data.List      as ListHT
import qualified Test.Data.ListMatch as ListMatch
import qualified Test.Data.Maybe     as MaybeHT
import qualified Test.Data.Function  as FunctionHT


prefix :: String -> [(String, IO ())] -> [(String, IO ())]
prefix msg =
   map (\(str,test) -> (msg ++ "." ++ str, test))

main :: IO ()
main =
   mapM_ (\(msg,io) -> putStr (msg++": ") >> io) $
   concat $
      prefix "ReverseSpine" RevSpine.tests :
      prefix "ReverseElem" RevElem.tests :
      prefix "List"      ListHT.tests :
      prefix "ListMatch" ListMatch.tests :
      prefix "Maybe"     MaybeHT.tests :
      prefix "Function"  FunctionHT.tests :
      []