FPEvalDataset/LeetCodeProblem
0304
1 2module Main where3import Test.HUnit4 5--Program start6 7--Program end8 9-- Test cases10 11test1 :: Test12test1 = TestCase (assertEqual "for (isGood [2, 1, 3])," False (isGood [2, 1, 3]))13 14test2 :: Test15test2 = TestCase (assertEqual "for (isGood [1, 3, 3, 2])," True (isGood [1, 3, 3, 2]))16 17test3 :: Test18test3 = TestCase (assertEqual "for (isGood [1, 1])," True (isGood [1, 1]))19 20test4 :: Test21test4 = TestCase (assertEqual "for (isGood [3, 4, 4, 1, 2, 1])," False (isGood [3, 4, 4, 1, 2, 1]))22 23 24-- Grouping test cases25tests :: Test26tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3]27 28-- Running the tests29main :: IO Counts30main = runTestTT tests31 