TheRealSamuel/LeetCodeProblem
0572
1 2module Main where3import Test.HUnit4 5--Program start6 7--Program end8 9-- Test cases10 11test1 :: Test12test1 = TestCase (assertEqual "for (passThePillow 4 5)," 2 (passThePillow 4 5))13 14test2 :: Test15test2 = TestCase (assertEqual "for (passThePillow 3 2)," 3 (passThePillow 3 2))16 17test3 :: Test18test3 = TestCase (assertEqual "for (passThePillow 724 598)," 599 (passThePillow 724 598))19 20test4 :: Test21test4 = TestCase (assertEqual "for (passThePillow 977 319)," 320 (passThePillow 977 319))22 23test5 :: Test24test5 = TestCase (assertEqual "for (passThePillow 638 481)," 482 (passThePillow 638 481))25 26test6 :: Test27test6 = TestCase (assertEqual "for (passThePillow 436 189)," 190 (passThePillow 436 189))28 29test7 :: Test30test7 = TestCase (assertEqual "for (passThePillow 31 202)," 23 (passThePillow 31 202))31 32test8 :: Test33test8 = TestCase (assertEqual "for (passThePillow 603 872)," 333 (passThePillow 603 872))34 35test9 :: Test36test9 = TestCase (assertEqual "for (passThePillow 952 39)," 40 (passThePillow 952 39))37 38 39-- Grouping test cases40tests :: Test41tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]42 43-- Running the tests44main :: IO Counts45main = runTestTT tests46 