diff --git a/tests/UnitTest.hs b/tests/UnitTest.hs index 49a788d..2d123ed 100644 --- a/tests/UnitTest.hs +++ b/tests/UnitTest.hs @@ -26,7 +26,7 @@ test1 = TestCase $ testMalformed = TestCase $ case Track.parse "<gpx><dgdsfg>></gpx>" of Left err -> assertBool "syntax error" True - Right t -> assertFailure "no error message parsing bad xml" + Right _ -> assertFailure "no error message parsing bad xml" test2 = TestCase $ case Track.parse onepoint @@ -36,6 +36,7 @@ test2 = TestCase $ assertEqual "matches lat/lon" (Track.Pos 51.0 (-0.1)) (Track.pos p) + Right [] -> assertFailure "no points" test3 = TestCase $ case Track.parse onepoint @@ -44,6 +45,7 @@ test3 = TestCase $ Right (p:ps) -> assertEqual "matches elevation" Nothing (Track.elevation p) + Right [] -> assertFailure "no points" test4 = TestCase $ case Track.parse onepointEle @@ -52,6 +54,7 @@ test4 = TestCase $ Right (p:ps) -> assertEqual "matches elevation" (Just 25.2) (Track.elevation p) + Right [] -> assertFailure "no points" tests :: Test tests = TestList [