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

access psv #3107

Merged
merged 10 commits into from
May 28, 2021
Prev Previous commit
Next Next commit
lint
  • Loading branch information
gknisely committed May 26, 2021
commit 990b0cab2ad5659cc8903cea067ed64a260064ab
33 changes: 15 additions & 18 deletions test/gurka/test_access_psv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,10 @@ TEST(Standalone, AccessPsvNode) {
)";

const gurka::ways ways = {
{"AB", {{"highway", "primary"}}},
{"BC", {{"highway", "primary"}}},
{"CD", {{"highway", "primary"}}},
{"DE", {{"highway", "primary"}}},
{"EG", {{"highway", "primary"}}},
{"HG", {{"highway", "primary"}}},
{"CF", {{"highway", "primary"}}},
{"FH", {{"highway", "primary"}}},
{"AB", {{"highway", "primary"}}}, {"BC", {{"highway", "primary"}}},
{"CD", {{"highway", "primary"}}}, {"DE", {{"highway", "primary"}}},
{"EG", {{"highway", "primary"}}}, {"HG", {{"highway", "primary"}}},
{"CF", {{"highway", "primary"}}}, {"FH", {{"highway", "primary"}}},

};

Expand All @@ -89,14 +85,15 @@ TEST(Standalone, AccessPsvNode) {
}}};

const auto layout =
gurka::detail::map_to_coordinates(ascii_map, gridsize_metres, {5.1079374, 52.0887174});
auto map = gurka::buildtiles(layout, ways, nodes, {}, "test/data/gurka_access_psv_way", build_config);
for (auto& c : costing) {
auto result = gurka::do_action(valhalla::Options::route, map, {"A", "H"}, c);

if (c == "bus" || c == "taxi")
gurka::assert::raw::expect_path(result, {"AB", "BC", "CF", "FH"});
else
gurka::assert::raw::expect_path(result, {"AB", "BC", "CD", "DE", "EG", "HG"});
}
gurka::detail::map_to_coordinates(ascii_map, gridsize_metres, {5.1079374, 52.0887174});
auto map =
gurka::buildtiles(layout, ways, nodes, {}, "test/data/gurka_access_psv_way", build_config);
for (auto& c : costing) {
auto result = gurka::do_action(valhalla::Options::route, map, {"A", "H"}, c);

if (c == "bus" || c == "taxi")
gurka::assert::raw::expect_path(result, {"AB", "BC", "CF", "FH"});
else
gurka::assert::raw::expect_path(result, {"AB", "BC", "CD", "DE", "EG", "HG"});
}
}