update test1 to work with Either

This commit is contained in:
Daniel Barlow 2024-10-29 19:20:08 +00:00
parent 5ec65cc49b
commit 6b6c1d487e

View File

@ -7,15 +7,12 @@ import Control.Exception
import Debug.Trace (trace, traceShow) import Debug.Trace (trace, traceShow)
-- test1 :: Test test1 :: Test
-- test1 = TestCase $ test1 = TestCase $
-- let case Track.parse "<gpx></gpx>" of
-- trk = Track.parse "<gpx></gpx>" Left err -> assertFailure (displayException err)
-- in Right t -> assertEqual "empty track has no elements"
-- assertEqual "empty track has no elements" 0 (Track.length t)
-- 0 (Track.length trk)
test3 = TestCase $ assertEqual "empty track has no elements" 1 2
test2 = TestCase $ test2 = TestCase $
case Track.parse case Track.parse
@ -30,7 +27,7 @@ test2 = TestCase $
tests :: Test tests :: Test
tests = TestList [ tests = TestList [
-- TestLabel "test1" test1, TestLabel "test1" test1,
TestLabel "test2" test2 TestLabel "test2" test2
] ]