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