Commit Graph

34 Commits

Author SHA1 Message Date
e15c42ff4a handle bad data
where by "handle" we mean that Track.parse now returns an Either
instead of making up data points that lie on the equator
2024-10-31 00:35:19 +00:00
2befb534a1 use composition instead of lambda 2024-10-30 21:17:26 +00:00
aa1f69f3d4 reindent using ormolu 2024-10-30 21:03:11 +00:00
31ba15f5a9 use partial functions in tests
I claim that it's ok because if the match is non-exhaustive then the
test will fail anyway
2024-10-30 20:56:52 +00:00
aeb002092c make hunit exit 1 if there are errors 2024-10-30 20:45:37 +00:00
36eeea6bef shorten tests using Either operations 2024-10-30 20:27:57 +00:00
dd49bc50fa parse trkpt timestamp 2024-10-30 17:44:40 +00:00
5ec4e6be9a parse cadence and power 2024-10-30 17:17:48 +00:00
3278c7962c add hlint and apply suggestions 2024-10-30 14:25:54 +00:00
c514c20e68 use real gpx namespace 2024-10-30 13:30:33 +00:00
90101760a2 fail tests if empty points array
tests were passing despite incomplete pattern matches, oops
2024-10-30 13:29:36 +00:00
a65c7fb8a9 remove TestLabels
they were only there because we cargo-culted them
2024-10-29 21:47:36 +00:00
d81099075a check we handle malformed gpx input
for some very obvious xml parse error
2024-10-29 21:44:49 +00:00
1007404a24 parse gpx elevation 2024-10-29 21:23:22 +00:00
6099753702 pass expected actual to assertEqual 2024-10-29 21:23:22 +00:00
6447030949 remove elevation from Pos
it allows us no way to represent "elevation unknown" which is a
possibility for GPX files
2024-10-29 21:23:22 +00:00
1a1186fbff check lat/lon attrs in test 2024-10-29 19:21:25 +00:00
6b6c1d487e update test1 to work with Either 2024-10-29 19:20:08 +00:00
5ec65cc49b beginning of xml parsing 2024-10-28 23:35:36 +00:00
0ad6eaec2f test calls actual code we wrote 2024-10-27 23:13:39 +00:00
ed94fa57bc make "cabal test" work 2024-10-27 20:19:58 +00:00
1e2c54b0e1 WIP before change of direction 2024-10-27 18:16:02 +00:00
6e4c1b7351 add hr 2024-10-25 21:25:20 +01:00
a85a00762d parse cadence 2024-10-25 00:12:19 +01:00
94a8987828 improve test for missing ele 2024-10-25 00:11:58 +01:00
2204a53a4f parse power 2024-10-25 00:00:37 +01:00
086664f8fb extract Position from the Point type 2024-10-24 23:06:00 +01:00
cf6d4cf9c0 timestamp is optional 2024-10-24 18:28:40 +01:00
a762245d86 elevation is optional in gpx
(so is nearly everything else, but am doing one thing at a time)
2024-10-24 18:24:03 +01:00
7b8e07d3ba check we read all <trkseg> not just the first
.. it turns out that elm-xml-decode does this already
2024-10-24 17:59:59 +01:00
a54f903326 add time and elevation to gpx parsing 2024-10-24 17:14:35 +01:00
6b3c456c41 reverse actual and expected in Expect
otherwise the error messages when test fails are arse about face
2024-10-24 17:13:17 +01:00
b78dbda7b8 parse actual lat/lon from gpx trkpt nodes 2024-10-23 23:49:19 +01:00
2286ae1a49 first passing test 2024-10-23 23:37:29 +01:00