Crate tests

source · []
Expand description

Integration tests

Functions

Describe all public transit routes and keep under version control to spot diffs easily.

bus_test 🔒

On set maps with bus routes imported, simulate an hour to flush out crashes.

Verify all edits under version control can be correctly apply to their map.

Verify what turns are generated by writing (from lane, to lane, turn type).

import_map 🔒

Run the contents of a .osm through the full map importer with default options.

main 🔒
run_sim 🔒
smoke_test 🔒

Simulate an hour on every map.

Generate single blocks and merged LTN-style blocks for some maps, counting the number of failures. Store in a goldenfile, so somebody can manually do a visual diff if anything changes.

Verify lane-chaging behavior is overall reasonable, by asserting all cars and bikes can complete their trip under a time limit.

Test the map pipeline by importing simple, handcrafted .osm files, then emitting goldenfiles that summarize part of the generated map. Keep the goldenfiles under version control to notice when they change. The goldenfiles (and changes to them) themselves aren’t easy to understand, but the test maps are.