Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test1 = TestCase (assertEqual "The output should be True" True (c_all (>0) [1, 2, 3, 4, 5, 6, 7]))
- test2 = TestCase (assertEqual "The output should be False" False (c_all (=="is") ["Haskell", "is", "not", "easy"]))
- test3 = TestCase (assertEqual "The output should be False" True (c_all (>0) EmptyTree))
- test4 = TestCase (assertEqual "The output should be True" True (c_all (>0) (Node 5 (Node 2 (Node 7 EmptyTree EmptyTree) (Node 7 EmptyTree EmptyTree)) (Node 7 (Node 7 EmptyTree EmptyTree) (Node 7 EmptyTree EmptyTree)))))
- -- test5 = TestCase (assertEqual "The output should be 7" 7 (c_max para_max [1, 3, 5, 7]))
- -- test6 = TestCase (assertEqual "The output should be zzzzzzz" "zzzzzzz" (c_max para_max ["a", "zzzzzzz", "bc", "ddd"]))
- -- test7 = TestCase (assertEqual "The output should be 7" 7 (c_max para_max (Node 7 (Node 1 EmptyTree EmptyTree) (Node 2 EmptyTree EmptyTree))))
- -- test8 = TestCase (assertEqual "The output should be an EmptyTree" EmptyTree (c_max para_max EmptyTree))
- -- tests = TestList [TestLabel "all_list_int" test1, TestLabel "all_list_char" test2, TestLabel "all_tree1" test3, TestLabel "all_tree2" test4, TestLabel "max_list_int" test5, TestLabel "max_list_char" test6, TestLabel "max_tree1" test7, TestLabel "max_tree2" test8]
- tests = TestList [TestLabel "all_list_int" test1, TestLabel "all_list_char" test2, TestLabel "all_tree1" test3, TestLabel "all_tree2" test4]
- myTest = runTestTT tests
- main :: IO Counts
- main = myTest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement