File size: 519 Bytes
6c3b977
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

module Main where
import Test.HUnit

--Program start

--Program end

-- Test cases

test1 :: Test
test1 = TestCase (assertEqual "for (arrayChange [1,2,4,6] [[1,3],[4,7],[6,1]])," [3,2,7,1] (arrayChange [1,2,4,6] [[1,3],[4,7],[6,1]]))

test2 :: Test
test2 = TestCase (assertEqual "for (arrayChange [1,2] [[1,3],[2,1],[3,2]])," [2,1] (arrayChange [1,2] [[1,3],[2,1],[3,2]]))


-- Grouping test cases
tests :: Test
tests = TestList [TestLabel "Test1" test1]

-- Running the tests
main :: IO Counts
main = runTestTT tests