Skip to content

Correct waypoint numbers are shown in Schedule.verify() error messages - #403

Merged
j-atkins merged 3 commits into
mainfrom
waypoint-numbers
Sep 30, 2026
Merged

j-atkins merged 3 commits into
mainfrom
waypoint-numbers

Conversation

@j-atkins

Copy link
Copy Markdown
Collaborator

Two of the Schedule.verify() checks ('waypoint would be reached too late' and 'waypoints are not in order') could show the wrong waypoint number in their error messages. For the 'too late' check, this only happened when the departure port was empty/not-in-use. In that case, the numbering was displaced by 1, so the error named the waypoint before the one actually at fault. The 'not in order' check was wrong in all cases, because it listed the waypoints that were correctly ordered (and showed ports as #None).

This PR fixes both so that the correct waypoint is named. The tests now include a configuration with an inactive departure port, and check the exact waypoint named in the 'not in order' error.

…g non-active Ports); add another test param to ensure getting the correct waypoint
…points are named in the out-of-order waypoint times error
@j-atkins
j-atkins merged commit dfdcf5d into main Sep 30, 2026
12 checks passed
@j-atkins
j-atkins deleted the waypoint-numbers branch September 30, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants