Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: E026 - 0,0 is invalid vehicle coordinate #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

briandonahue
Copy link

Summary:

Addresses #77. 0,0 is invalid vehicle coordinate. Added check for vehicle location. Also updated UtilTest.java as it had a test with 0,0 as a valid coordinate. My understanding is it should be invalid here as well.

Expected behavior:

Vehicle location with 0,0 as a coordinate should throw E026

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with mvn test to make sure you didn't break anything
  • Format the title like "feat: {new feature short description}" or "fix: {describe what was fixed}". Title must follow the Conventional Commit Specification (https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s) (N/A)

positionBuilder.setLatitude(0);
positionBuilder.setLongitude(0);

assertEquals(true, GtfsUtils.isPositionValid(positionBuilder.build()));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this test in the invalid test cases because it seems like 0,0 should be invalid according to #77 and this test broke when I changed the validator.

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