souplesse/tests/TrackTest.elm

27 lines
831 B
Elm
Raw Normal View History

2024-10-23 22:37:29 +00:00
module TrackTest exposing (specs)
import Fixtures
import Track exposing (Track, Point)
2024-10-23 22:37:29 +00:00
import Test exposing (..)
import Expect exposing (Expectation)
2024-10-24 16:14:35 +00:00
import Time
2024-10-23 22:37:29 +00:00
specs: Test
specs =
describe "XML Parsing"
[ test "it runs" <|
\_ ->
let
r = Track.parse Fixtures.threepoints
expected =
2024-10-24 16:14:35 +00:00
[ (Point 51.600643 -0.01856 64.8 (Time.millisToPosix 1729669252256))
, (Point 51.600679 -0.018179 65.5 (Time.millisToPosix 1729669255259))
, (Point 51.600697 -0.018064 66.2 (Time.millisToPosix 1729669256231))
]
2024-10-23 22:37:29 +00:00
in
case r of
(Ok trk) -> Expect.equalLists expected trk
2024-10-23 22:37:29 +00:00
_ -> Expect.fail "not ok"
]