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

More roundabout phrase tests #2382

Merged
merged 6 commits into from
May 18, 2020
Merged

More roundabout phrase tests #2382

merged 6 commits into from
May 18, 2020

Conversation

dgearhart
Copy link
Member

@dgearhart dgearhart commented May 18, 2020

Issue

  • Add Signs::GetGuideString unit tests
  • Fix Signs::GetGuideString to properly round or truncate max_count for each sign type
  • Add roundabout on unnamed cycleway test
  • Pass in the four expected instructions to the gurka expect_instructions_at_maneuver_index method

Tasklist

  • Add tests
  • Generally use squash merge to rebase and clean comments before merging
  • Update the changelog

@dgearhart dgearhart self-assigned this May 18, 2020
std::string guide_branch =
GetGuideBranchString(static_cast<uint32_t>(std::round(max_count / 2)),
GetGuideBranchString(static_cast<uint32_t>(
Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you @mandeepsandhu for flagging the integer division

// Create guide sign
// Specify input in descending consecutive count order
Signs signs =
GetGuideSigns({std::make_tuple("US 322 West", 1, 1), std::make_tuple("US 22 West", 1, 0),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a test case where the consecutive count is > 1, say 2 of them have 2 and the result shows both items getting selected when limit_by_consecutive_count is set (for different values of. max_count)?

Copy link
Member Author

Choose a reason for hiding this comment

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

@mandeepsandhu pushed up more tests
Added more TestGetGuideString tests with no, 1, and multiple consecutive counts

TryGetGuideString(
signs, 0, true,
"US 322 West/US 22 West/Freedom Highway/Valhalla Highway/A 1/Remscheid/Wermelskirchen/Hückeswagen");
TryGetGuideString(signs, 4, true, "US 322 West/US 22 West/A 1/Remscheid");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is Remscheid being returned here? I thought if limit_by_consecutive_count is set, only entries with the same consecutive count are returned? In this case A 1 has a consecutive count of 1, while Remscheid's is 0, which should make us drop Remscheid, no?

Copy link
Contributor

@mandeepsandhu mandeepsandhu May 18, 2020

Choose a reason for hiding this comment

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

Why is Remscheid being returned here? I thought if limit_by_consecutive_count is set, only entries with the same consecutive count are returned? In this case A 1 has a consecutive count of 1, while Remscheid's is 0, which should make us drop Remscheid, no?

Sorry, ignore this question. Thats not consecutive count I was looking at, but the "is route" attribute.

Copy link
Contributor

@mandeepsandhu mandeepsandhu left a comment

Choose a reason for hiding this comment

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

Thanks for the unit tests. LGTM.

@dgearhart dgearhart merged commit 44532ca into master May 18, 2020
@dgearhart dgearhart deleted the more_roundabout_phrase_tests branch May 18, 2020 21:02
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.

None yet

2 participants