diff options
author | Maxim Pimenov <m@maps.me> | 2015-04-07 20:32:33 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 04:15:48 +0300 |
commit | c8be2433c06bba965f9f04547db66ef2f79eba0c (patch) | |
tree | 7e8d7ce0cdcda5cb47943627b43e87a5fe296ebc | |
parent | 7716dd4be96ed39838efd9b81c3ae76fdbc4ce7d (diff) |
[pedestrian] more benchmarkspedestrian-benchmarks
-rw-r--r-- | pedestrian_routing_benchmarks/pedestrian_routing_test.cc | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/pedestrian_routing_benchmarks/pedestrian_routing_test.cc b/pedestrian_routing_benchmarks/pedestrian_routing_test.cc index 36608f917c..b14079877e 100644 --- a/pedestrian_routing_benchmarks/pedestrian_routing_test.cc +++ b/pedestrian_routing_benchmarks/pedestrian_routing_test.cc @@ -11,7 +11,8 @@ #include "../std/string.hpp" #include "../std/vector.hpp" -UNIT_TEST(PedestrianRouting_UK) + +void TestTwoPoints(uint32_t featureIdStart, uint32_t segIdStart, uint32_t featureIdFinal, uint32_t segIdFinal) { string const kMapName = "UK_England"; classificator::Load(); @@ -26,8 +27,8 @@ UNIT_TEST(PedestrianRouting_UK) router.SetRoadGraph(new routing::FeaturesRoadGraph(&index, id)); - vector<routing::RoadPos> startPos = {{59231052, true, 8}, {59231052, false, 8}}; - vector<routing::RoadPos> finalPos = {{49334376, true, 0}, {49334376, false, 0}}; + vector<routing::RoadPos> startPos = {{featureIdStart, true, segIdStart}, {featureIdStart, false, segIdStart}}; + vector<routing::RoadPos> finalPos = {{featureIdFinal, true, segIdFinal}, {featureIdFinal, false, segIdFinal}}; router.SetFinalRoadPos(finalPos); vector<routing::RoadPos> route; @@ -35,3 +36,18 @@ UNIT_TEST(PedestrianRouting_UK) router.CalculateRoute(startPos, route); LOG(LINFO, ("Route length:", route.size())); } + +UNIT_TEST(PedestrianRouting_UK_Long1) +{ + TestTwoPoints(59231052, 8, 49334376, 0); +} + +UNIT_TEST(PedestrianRouting_UK_Medium1) +{ + TestTwoPoints(3038057, 0, 45899679, 3); +} + +UNIT_TEST(PedestrianRouting_UK_Short1) +{ + TestTwoPoints(3038057, 0, 3032688, 3); +} |