|
|
| module Main where |
| import Test.HUnit |
|
|
| |
| satisfiesConditions :: [[Int]] -> Bool |
| satisfiesConditions grid = undefined |
|
|
| |
|
|
| |
|
|
| test1 :: Test |
| test1 = TestCase (assertEqual "for (satisfiesConditions [[1,0,2],[1,0,2]])," True (satisfiesConditions [[1,0,2],[1,0,2]])) |
|
|
| test2 :: Test |
| test2 = TestCase (assertEqual "for (satisfiesConditions [[1,1,1],[0,0,0]])," False (satisfiesConditions [[1,1,1],[0,0,0]])) |
|
|
| test3 :: Test |
| test3 = TestCase (assertEqual "for (satisfiesConditions [[1],[2],[3]])," False (satisfiesConditions [[1],[2],[3]])) |
|
|
| test4 :: Test |
| test4 = TestCase (assertEqual "for (satisfiesConditions [[7, 6, 4, 7, 1, 8, 9, 7], [3, 8, 3, 5, 3, 7, 6, 6], [3, 2, 7, 1, 3, 1, 1, 4], [0, 2, 4, 9, 3, 1, 4, 5], [0, 2, 9, 7, 5, 3, 4, 1], [1, 5, 4, 4, 9, 6, 9, 3], [2, 9, 8, 5, 3, 7, 2, 1], [9, 4, 0, 6, 1, 7, 4, 1], [5, 9, 9, 6, 5, 6, 5, 8], [4, 0, 7, 1, 6, 2, 9, 7]])," False (satisfiesConditions [[7, 6, 4, 7, 1, 8, 9, 7], [3, 8, 3, 5, 3, 7, 6, 6], [3, 2, 7, 1, 3, 1, 1, 4], [0, 2, 4, 9, 3, 1, 4, 5], [0, 2, 9, 7, 5, 3, 4, 1], [1, 5, 4, 4, 9, 6, 9, 3], [2, 9, 8, 5, 3, 7, 2, 1], [9, 4, 0, 6, 1, 7, 4, 1], [5, 9, 9, 6, 5, 6, 5, 8], [4, 0, 7, 1, 6, 2, 9, 7]])) |
|
|
| test5 :: Test |
| test5 = TestCase (assertEqual "for (satisfiesConditions [[0, 9], [1, 5], [0, 1], [9, 9], [9, 7], [0, 0], [4, 6], [0, 8], [0, 9]])," False (satisfiesConditions [[0, 9], [1, 5], [0, 1], [9, 9], [9, 7], [0, 0], [4, 6], [0, 8], [0, 9]])) |
|
|
| test6 :: Test |
| test6 = TestCase (assertEqual "for (satisfiesConditions [[9, 8, 8, 3, 0, 8, 7, 9, 9, 4], [1, 9, 9, 0, 2, 9, 7, 1, 9, 9], [3, 0, 6, 8, 3, 6, 5, 0, 2, 0], [8, 1, 1, 7, 2, 2, 3, 1, 0, 8], [5, 4, 5, 5, 2, 7, 8, 6, 8, 2], [1, 0, 8, 8, 2, 1, 1, 4, 4, 6]])," False (satisfiesConditions [[9, 8, 8, 3, 0, 8, 7, 9, 9, 4], [1, 9, 9, 0, 2, 9, 7, 1, 9, 9], [3, 0, 6, 8, 3, 6, 5, 0, 2, 0], [8, 1, 1, 7, 2, 2, 3, 1, 0, 8], [5, 4, 5, 5, 2, 7, 8, 6, 8, 2], [1, 0, 8, 8, 2, 1, 1, 4, 4, 6]])) |
|
|
| test7 :: Test |
| test7 = TestCase (assertEqual "for (satisfiesConditions [[9, 8, 0, 7], [7, 8, 9, 4], [5, 1, 7, 6], [0, 2, 1, 3], [4, 1, 4, 7], [6, 4, 6, 0], [0, 8, 1, 3], [9, 5, 3, 8]])," False (satisfiesConditions [[9, 8, 0, 7], [7, 8, 9, 4], [5, 1, 7, 6], [0, 2, 1, 3], [4, 1, 4, 7], [6, 4, 6, 0], [0, 8, 1, 3], [9, 5, 3, 8]])) |
|
|
| test8 :: Test |
| test8 = TestCase (assertEqual "for (satisfiesConditions [[3], [1], [9]])," False (satisfiesConditions [[3], [1], [9]])) |
|
|
|
|
| |
| tests :: Test |
| tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7] |
|
|
| |
| main :: IO Counts |
| main = runTestTT tests |
|
|