| module Main where | |
| import Test.HUnit | |
| --Program start | |
| --Program end | |
| -- Test cases | |
| test1 :: Test | |
| test1 = TestCase (assertEqual "for (buildMatrix 3 [[1,2],[3,2]] [[2,1],[3,2]])," [[3,0,0],[0,0,1],[0,2,0]] (buildMatrix 3 [[1,2],[3,2]] [[2,1],[3,2]])) | |
| test2 :: Test | |
| test2 = TestCase (assertEqual "for (buildMatrix 3 [[1,2],[2,3],[3,1],[2,3]] [[2,1]])," [] (buildMatrix 3 [[1,2],[2,3],[3,1],[2,3]] [[2,1]])) | |
| -- Grouping test cases | |
| tests :: Test | |
| tests = TestList [TestLabel "Test1" test1] | |
| -- Running the tests | |
| main :: IO Counts | |
| main = runTestTT tests | |