From 101707ce5ceb9159a7aa94837e1c604b4f198342 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Mon, 12 Oct 2015 09:52:37 +0300 Subject: [PATCH] Routing unit test fixing after changing behavier of sound pronouncing. --- routing/routing_tests/turns_sound_test.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/routing/routing_tests/turns_sound_test.cpp b/routing/routing_tests/turns_sound_test.cpp index 4cdc9f7d1e..98cf50ea74 100644 --- a/routing/routing_tests/turns_sound_test.cpp +++ b/routing/routing_tests/turns_sound_test.cpp @@ -184,7 +184,7 @@ UNIT_TEST(TurnsSoundMetersTwoTurnsTest) string const engShortJson = "\ {\ - \"in_700_meters\":\"In 700 meters.\",\ + \"in_600_meters\":\"In 600 meters.\",\ \"make_a_sharp_right_turn\":\"Make a sharp right turn.\",\ \"enter_the_roundabout\":\"Enter the roundabout.\"\ }"; @@ -203,9 +203,13 @@ UNIT_TEST(TurnsSoundMetersTwoTurnsTest) TEST(turnNotifications.empty(), ()); // 700 meters till the turn. It's time to pronounce the first voice notification. + // The speed is high. + // The compensation of kStartBeforeSeconds/kMinStartBeforeMeters/kMaxStartBeforeMeters is not enough. + // The user will be closer to the turn while pronouncing despite the compensation. + // So it should be pronounced "In 600 meters." turns.front().m_distMeters = 700.; turnSound.GenerateTurnSound(turns, turnNotifications); - vector const expectedNotification1 = {{"In 700 meters. Make a sharp right turn."}}; + vector const expectedNotification1 = {{"In 600 meters. Make a sharp right turn."}}; TEST_EQUAL(turnNotifications, expectedNotification1, ()); turnSound.SetSpeedMetersPerSecond(32.);