{-# LANGUAGE GADTs, PartialTypeSignatures #-} module Tests_09(runTests, boolTests) where import Test.LeanCheck -- Generic Setup data Test = forall a. Testable a => Test String String a runTests = flip mapM_ tests (\ (Test ex name t) -> putStrLn ("running " ++ ex ++ "(" ++ name ++ ")" ++ "-tests") >> checkFor 1000 t) -- Tests for this week -- 1.5 -- test for equivalence for DList type testEquivD :: [Int] -> Bool testEquivD xs = undefined -- test for equivalence for OList type testEquivO :: [Int] -> Bool testEquivO xs = undefined -- add: testInsertRemoveO, and testInsertRemoveD of type ... -> Bool -- where the ... may be arbitrary many arguments of types [Int], Int and Bool, -- and uncomment them in the definition of "tests" tests :: [Test] tests = [ Test "2.5" "equivTestD" testEquivD , Test "2.5" "equivTestO" testEquivO -- , Test "2.5" "testInsertRemoveD" testInsertRemoveD -- , Test "2.5" "testInsertRemoveO" testInsertRemoveO ] boolTests :: [((String,String), Bool)] boolTests = map (\ (Test ex n t) -> ((ex,n), holds 1000 t)) tests