-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
good first issueGood for newcomers to the codebaseGood for newcomers to the codebase
Description
Summary
Two small but important modules in internal/gtfs/ currently have no test coverage:
route_search.go(57 lines) — builds search queries and searches routes by namespatial_index.go(73 lines) — performs bounding-box spatial queries on stops
Both have clear inputs/outputs and are self-contained, making them good candidates for focused unit tests.
Acceptance criteria
- Create tests for
route_search.gocovering:- Building search queries from user input
- Searching routes with matching results
- Searching routes with no results (empty case)
- Edge cases (special characters, empty strings)
- Create tests for
spatial_index.gocovering:- Building the spatial index from stop data
- Querying stops within a bounding box
- Boundary conditions (no stops in range, all stops in range)
- Edge cases (zero-size bounds, very large bounds)
- Follow existing test patterns — see
internal/gtfs/*_test.gofor setup helpers and conventions -
make testpasses -
make lintpasses
Context
The test infrastructure for GTFS data is well-established. Look at existing test files in internal/gtfs/ for how to set up test data using the RABA fixtures in testdata/.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomers to the codebaseGood for newcomers to the codebase