DatasetRepo's picture
01f8c30643da4e616b39828bdd070cc9851cf24934ec52fcd98787d2c1446c33
2305194 verified
raw
history blame
683 Bytes
module Main where
import Test.HUnit
--Program start
--Program end
-- Test cases
test1 :: Test
test1 = TestCase (assertEqual "for (isGood [2, 1, 3])," False (isGood [2, 1, 3]))
test2 :: Test
test2 = TestCase (assertEqual "for (isGood [1, 3, 3, 2])," True (isGood [1, 3, 3, 2]))
test3 :: Test
test3 = TestCase (assertEqual "for (isGood [1, 1])," True (isGood [1, 1]))
test4 :: Test
test4 = TestCase (assertEqual "for (isGood [3, 4, 4, 1, 2, 1])," False (isGood [3, 4, 4, 1, 2, 1]))
-- Grouping test cases
tests :: Test
tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3]
-- Running the tests
main :: IO Counts
main = runTestTT tests