Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-06-23 14:14:36 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:54:07 +0300
commit3394a431545a3ebccb7685ae70455ea560b09326 (patch)
treee19dc0da6cd2d432fac306d5724c875fc6c7265b /integration_tests
parent3f700633c14d8c9fd6e4fd6893787c75ac22c3c2 (diff)
Geometry unpacking tests.
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/osrm_route_test.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/integration_tests/osrm_route_test.cpp b/integration_tests/osrm_route_test.cpp
index 3cb1f16155..9a25830871 100644
--- a/integration_tests/osrm_route_test.cpp
+++ b/integration_tests/osrm_route_test.cpp
@@ -44,6 +44,39 @@ namespace
);
}
+ // Geometry unpacking test.
+ UNIT_TEST(RussiaFerryToCrimeaLoadCrossGeometryTest)
+ {
+ // Forward
+ TRouteResult route = integration::CalculateRoute(
+ integration::GetAllMaps(), MercatorBounds::FromLatLon(45.34123, 36.67679),
+ {0., 0.}, MercatorBounds::FromLatLon(45.36479, 36.62194));
+ TEST_EQUAL(route.second, IRouter::NoError, ());
+ TEST_GREATER(route.first->GetPoly().GetSize(), 50, ());
+ // And backward case
+ route = integration::CalculateRoute(
+ integration::GetAllMaps(), MercatorBounds::FromLatLon(45.36479, 36.62194), {0., 0.},
+ MercatorBounds::FromLatLon(45.34123, 36.67679));
+ TEST_EQUAL(route.second, IRouter::NoError, ());
+ TEST_GREATER(route.first->GetPoly().GetSize(), 50, ());
+ }
+
+ UNIT_TEST(PriceIslandLoadCrossGeometryTest)
+ {
+ // Forward
+ TRouteResult route = integration::CalculateRoute(
+ integration::GetAllMaps(), MercatorBounds::FromLatLon(46.16255,-63.81643),
+ {0., 0.}, MercatorBounds::FromLatLon(46.25401, -63.70213));
+ TEST_EQUAL(route.second, IRouter::NoError, ());
+ TEST_GREATER(route.first->GetPoly().GetSize(), 29, ());
+ // And backward case
+ route = integration::CalculateRoute(
+ integration::GetAllMaps(), MercatorBounds::FromLatLon(46.25401, -63.70213), {0., 0.},
+ MercatorBounds::FromLatLon(46.16255,-63.81643));
+ TEST_EQUAL(route.second, IRouter::NoError, ());
+ TEST_GREATER(route.first->GetPoly().GetSize(), 29, ());
+ }
+
// Cross mwm tests.
UNIT_TEST(RussiaMoscowLeningradskiy39GerPanfilovtsev22RouteTest)
{