From 2dd0331d6658efff1b7caeef4ec70e695ccc7532 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Mon, 24 Sep 2018 14:01:03 +0300 Subject: [PATCH] Map changing test update. --- routing/index_router.cpp | 2 +- routing/routing_integration_tests/bicycle_route_test.cpp | 2 +- routing/routing_integration_tests/route_test.cpp | 7 +++---- routing/routing_integration_tests/turn_test.cpp | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/routing/index_router.cpp b/routing/index_router.cpp index 9d54095441..f6b7d78240 100644 --- a/routing/index_router.cpp +++ b/routing/index_router.cpp @@ -75,7 +75,7 @@ double CalcMaxSpeed(NumMwmIds const & numMwmIds, vehicleModelFactory.GetVehicleModelForCountry(country)->GetMaxWeightSpeed(); maxSpeed = max(maxSpeed, mwmMaxSpeed); }); - CHECK_GREATER(maxSpeed, 0.0, ()); + CHECK_GREATER(maxSpeed, 0.0, ("Most likely |numMwmIds| is empty.")); return maxSpeed; } diff --git a/routing/routing_integration_tests/bicycle_route_test.cpp b/routing/routing_integration_tests/bicycle_route_test.cpp index 9954a12601..5c52579479 100644 --- a/routing/routing_integration_tests/bicycle_route_test.cpp +++ b/routing/routing_integration_tests/bicycle_route_test.cpp @@ -64,7 +64,7 @@ UNIT_TEST(NetherlandsAmsterdamBicycleYes) Route const & route = *routeResult.first; RouterResultCode const result = routeResult.second; TEST_EQUAL(result, RouterResultCode::NoError, ()); - TEST(base::AlmostEqualAbs(route.GetTotalTimeSec(), 357.0, 1.0), ()); + TEST(base::AlmostEqualAbs(route.GetTotalTimeSec(), 357.0, 1.0), (route.GetTotalTimeSec())); } // This test on tag cycleway=opposite for a streets which have oneway=yes. diff --git a/routing/routing_integration_tests/route_test.cpp b/routing/routing_integration_tests/route_test.cpp index 45c77eaec7..2b3dd500fe 100644 --- a/routing/routing_integration_tests/route_test.cpp +++ b/routing/routing_integration_tests/route_test.cpp @@ -17,7 +17,7 @@ namespace integration::CalculateRouteAndTestRouteLength( integration::GetVehicleComponents(), MercatorBounds::FromLatLon(19.20789, 30.50663), {0., 0.}, - MercatorBounds::FromLatLon(19.17289, 30.47315), 10283.7); + MercatorBounds::FromLatLon(19.17289, 30.47315), 7645.0); } UNIT_TEST(MoscowKashirskoeShosseCrossing) @@ -94,7 +94,6 @@ namespace // Geometry unpacking test. UNIT_TEST(RussiaFerryToCrimeaLoadCrossGeometryTest) { - size_t constexpr kExpectedPointsNumber = 50; // Forward TRouteResult route = integration::CalculateRoute(integration::GetVehicleComponents(), @@ -102,14 +101,14 @@ namespace MercatorBounds::FromLatLon(45.36479, 36.62194)); TEST_EQUAL(route.second, RouterResultCode::NoError, ()); CHECK(route.first, ()); - integration::TestRoutePointsNumber(*route.first, kExpectedPointsNumber); + integration::TestRoutePointsNumber(*route.first, 62 /* expected points number */); // And backward case route = integration::CalculateRoute(integration::GetVehicleComponents(), MercatorBounds::FromLatLon(45.36479, 36.62194), {0., 0.}, MercatorBounds::FromLatLon(45.34123, 36.67679)); TEST_EQUAL(route.second, RouterResultCode::NoError, ()); CHECK(route.first, ()); - integration::TestRoutePointsNumber(*route.first, kExpectedPointsNumber); + integration::TestRoutePointsNumber(*route.first, 50 /* expected points number */); } UNIT_TEST(PriceIslandLoadCrossGeometryTest) diff --git a/routing/routing_integration_tests/turn_test.cpp b/routing/routing_integration_tests/turn_test.cpp index 52a827c2d4..0f81c128a4 100644 --- a/routing/routing_integration_tests/turn_test.cpp +++ b/routing/routing_integration_tests/turn_test.cpp @@ -960,9 +960,8 @@ UNIT_TEST(RussiaMoscowMinskia2TurnTest) RouterResultCode const result = routeResult.second; TEST_EQUAL(result, RouterResultCode::NoError, ()); - integration::TestTurnCount(route, 2 /* expectedTurnCount */); + integration::TestTurnCount(route, 1 /* expectedTurnCount */); integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::TurnRight); - integration::GetNthTurn(route, 1).TestValid().TestDirection(CarDirection::TurnSlightRight); } // This test on getting correct (far enough) outgoing turn point (result of method GetPointForTurn())