From 0500caf568a0269342082b453fad490d14468827 Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Wed, 3 Oct 2018 17:36:33 -0400 Subject: [PATCH] Adding test case for Index and Concordance testing addPageNumber --- assignments/week4/hw/tests/IndexAndConcordanceTest.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assignments/week4/hw/tests/IndexAndConcordanceTest.hs b/assignments/week4/hw/tests/IndexAndConcordanceTest.hs index 35cb090..6d95819 100644 --- a/assignments/week4/hw/tests/IndexAndConcordanceTest.hs +++ b/assignments/week4/hw/tests/IndexAndConcordanceTest.hs @@ -9,4 +9,10 @@ import IndexAndConcordance(cleanup,createWordLists,makePairs, addPageNumber, cre unitTests = testGroup "IndexAndConcordanceTest" - [] + [testingAddPageNum] + + + str = ["hi","there","this","is","a", "test", "CASE"] + answer = [(1,"hi"),(1,"there"),(1,"this"),(1,"is"),(1,"a"),(1,"test"),(1,"CASE")] + + testingAddPageNum = testCase "should return: [(1,"hi"),(1,"there"),(1,"this"),(1,"is"),(1,"a"),(1,"test"),(1,"CASE")]" $ assertEqual [] answer (addPageNumber (1,str))