GeoCourse 0.1 test files
manifest.json lists every file with its expected result. A validator must accept each valid file and reject each invalid file with an error for the rule named. message is a substring of the reference validator's error, to help other validators match up.
valid/: files a reader must accept and ride.invalid/: at least one file per rule of section 8, each breaking only that rule.
The files are generated by npm run make-tests (scripts/make-tests.ts); example-ramp is taken verbatim from section 9 of the spec. CI runs the reference validator and the schema against all of them with npm test.
Pending: Frost Gate Traverse (75.6 km), the reference writer's first export, joins valid/ when it lands.
The test files are dedicated to the public domain under CC0 1.0 (../LICENSE).
Valid files
| File | Description |
|---|---|
| example-ramp.geocourse.json | The example from section 9: 25 m at a steady 8 %, heading east. |
| stadium-loop.geocourse.json | Closed local-frame loop with two 30 m bends, one wrapping through the start line. |
| s-bend.geocourse.json | A left bend straight into a right bend, listed as two bends split where the direction changes. |
| bend-at-start.geocourse.json | An open course that starts on a bend, measured with the window clamped at the start. |
Invalid files
| Rule | File | Description | Expected error contains |
|---|---|---|---|
| 1 | 01-type.geocourse.json | type is "course", not "Course". | type must be "Course" |
| 2 | 02-id.geocourse.json | id has upper-case letters and an underscore. | id must match |
| 3 | 03-channel-count.geocourse.json | Elevation has 3 values; floor instead of ceil drops the sample at the end. | expected ceil(length / step) + 1 = 4 values |
| 4 | 04-geometry-count.geocourse.json | Geometry has 3 positions instead of 4. | expected 2 × (ceil(length / step) + 1) = 8 positions |
| 5 | 05-no-heading.geocourse.json | Neither geometry nor profile.heading is present. | either geometry or profile.heading |
| 5 | 05-heading-360.geocourse.json | A heading stored as 3600 at scale 0.1; writers must store it as 0. | heading 360° is outside [0, 360) |
| 6 | 06-range-past-end.geocourse.json | A hazard at 30 m on a 25 m course. | is outside [0, length |
| 7 | 07-surface-gap.geocourse.json | Surface ranges stop at 20 m. | surface gap from 20 to length 25 |
| 8 | 08-geometry-length.geocourse.json | The last position is 5 m too far east. | geometry length disagrees with d |
| 9 | 09-grade-integral.geocourse.json | Grade says 20 % while elevation climbs 8 %. | grade integral differs from elevation change |
| 10 | 10-missing-bend.geocourse.json | The stadium loop with its north bend left out, while bendRadiusLimit says the list is complete. | missing left bend |
| 11 | 11-segment-id.geocourse.json | A segment without an id. | segment has no id |
| 12 | 12-loop-elevation.geocourse.json | The stadium loop ends 0.1 m higher than it starts. | first and last elevation samples differ |
| 13 | 13-required-extension.geocourse.json | extensionsRequired names an extension missing from extensionsUsed. | required extension "acme_wind" is not in extensionsUsed |
| 14 | 14-attribution.geocourse.json | OpenStreetMap data (ODbL-1.0) with no attribution. | requires attribution |
| 15 | 15-finish-on-loop.geocourse.json | The stadium loop with a finish marker; a closed course has none. | a closed course must not have a finish marker |