From 8a48a840895d65198bfade45fd213b4d3349da53 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 16 Apr 2020 17:12:16 +0300 Subject: [PATCH] [routing] Test on correct processing that a osm id of a road may correspond to several road feature ids for speed cameras case. --- .../speed_camera_notifications_tests.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/routing/routing_integration_tests/speed_camera_notifications_tests.cpp b/routing/routing_integration_tests/speed_camera_notifications_tests.cpp index 94717f9029..937fbca644 100644 --- a/routing/routing_integration_tests/speed_camera_notifications_tests.cpp +++ b/routing/routing_integration_tests/speed_camera_notifications_tests.cpp @@ -471,4 +471,17 @@ UNIT_TEST(SpeedCameraNotification_NeverMode_1) } } } + +// Test on case when a feature is split by a mini_roundabout or by a turning_loop and +// contains a speed camera. The thing is to pass this test it's necessary to process +// fake road feature ids correctly while speed cameras generation process. +UNIT_TEST(SpeedCameraNotification_CameraOnMiniRoundabout) +{ + RoutingSession routingSession; + InitRoutingSession({41.201998, 69.109587} /* from */, {41.200358, 69.107051} /* to */, + routingSession, SpeedCameraManagerMode::Never); + double const speedKmPH = 100.0; + ChangePosition({41.201998, 69.109587}, speedKmPH, routingSession); + TEST(!NoCameraFound(routingSession), ()); +} } // namespace