diff --git a/search/search_integration_tests/downloader_search_test.cpp b/search/search_integration_tests/downloader_search_test.cpp index aa09e05908..ddf5459cb3 100644 --- a/search/search_integration_tests/downloader_search_test.cpp +++ b/search/search_integration_tests/downloader_search_test.cpp @@ -224,18 +224,18 @@ void TestResults(vector received, vector expected) UNIT_CLASS_TEST(DownloaderSearchTest, Smoke) { - AddRegion("Flatland", "Square One", m2::PointD(0.0, 0.0), m2::PointD(1.0, 1.0)); - AddRegion("", "Square Two", m2::PointD(1.0, 1.0), m2::PointD(3.0, 3.0)); + AddRegion("Flatland", "Squareland One", m2::PointD(0.0, 0.0), m2::PointD(1.0, 1.0)); + AddRegion("", "Squareland Two", m2::PointD(1.0, 1.0), m2::PointD(3.0, 3.0)); AddRegion("Wonderland", "Shortpondland", m2::PointD(-1.0, -1.0), m2::PointD(0.0, 0.0)); AddRegion("", "Longpondland", m2::PointD(-3.0, -3.0), m2::PointD(-1.0, -1.0)); BuildWorld(); { - DownloaderSearchRequest request(m_dataSource, m_engine, "square one"); + DownloaderSearchRequest request(m_dataSource, m_engine, "squareland one"); request.Run(); TestResults(request.GetResults(), - {storage::DownloaderSearchResult("Square One", "Square One capital")}); + {storage::DownloaderSearchResult("Squareland One", "Squareland One capital")}); } { @@ -254,12 +254,12 @@ UNIT_CLASS_TEST(DownloaderSearchTest, Smoke) } { - DownloaderSearchRequest request(m_dataSource, m_engine, "square"); + DownloaderSearchRequest request(m_dataSource, m_engine, "squareland"); request.Run(); TestResults(request.GetResults(), - {storage::DownloaderSearchResult("Square One", "Square One capital"), - storage::DownloaderSearchResult("Square Two", "Square Two capital")}); + {storage::DownloaderSearchResult("Squareland One", "Squareland One capital"), + storage::DownloaderSearchResult("Squareland Two", "Squareland Two capital")}); } } } // namespace diff --git a/search/search_integration_tests/processor_test.cpp b/search/search_integration_tests/processor_test.cpp index b73cb2b9fd..65844958d0 100644 --- a/search/search_integration_tests/processor_test.cpp +++ b/search/search_integration_tests/processor_test.cpp @@ -179,7 +179,7 @@ UNIT_CLASS_TEST(ProcessorTest, Smoke) TestBuilding descartesHouse(m2::PointD(10, 10), "Descartes house", "2", "en"); TestBuilding bornHouse(m2::PointD(14.999, 15), "Born house", "8", firstAprilStreet.GetName("en"), "en"); - TestPOI busStop(m2::PointD(0, 0), "Bus stop", "en"); + TestPOI busStop(m2::PointD(0, 0), "Central bus stop", "en"); TestPOI tramStop(m2::PointD(0.0001, 0.0001), "Tram stop", "en"); TestPOI quantumTeleport1(m2::PointD(0.0002, 0.0002), "Quantum teleport 1", "en"); @@ -239,7 +239,7 @@ UNIT_CLASS_TEST(ProcessorTest, Smoke) } { Rules rules = {ExactMatch(wonderlandId, busStop)}; - TEST(ResultsMatch("Bus stop", rules), ()); + TEST(ResultsMatch("Central bus stop", rules), ()); } { Rules rules = {ExactMatch(wonderlandId, quantumCafe), @@ -784,7 +784,7 @@ UNIT_CLASS_TEST(ProcessorTest, TestCategories) TestPOI nonameAtm(m2::PointD(0, 0), "", "en"); nonameAtm.SetTypes({{"amenity", "atm"}}); - TestPOI namedAtm(m2::PointD(0.3, 0.3), "ATM", "en"); + TestPOI namedAtm(m2::PointD(0.03, 0.03), "ATM", "en"); namedAtm.SetTypes({{"amenity", "atm"}}); TestPOI busStop(m2::PointD(0.00005, 0.0005), "ATM Bus Stop", "en"); @@ -817,7 +817,7 @@ UNIT_CLASS_TEST(ProcessorTest, TestCategories) Rules const rules = {ExactMatch(wonderlandId, nonameAtm), ExactMatch(wonderlandId, namedAtm), ExactMatch(wonderlandId, busStop)}; - auto request = MakeRequest("atm"); + auto request = MakeRequest("San Francisco atm"); TEST(ResultsMatch(request->Results(), rules), ()); for (auto const & result : request->Results()) { @@ -930,7 +930,7 @@ UNIT_CLASS_TEST(ProcessorTest, TestCategorialSearch) ExactMatch(wonderlandId, hotelCafe), ExactMatch(testWorldId, homel), ExactMatch(wonderlandId, hotelDeVille)}; // A prefix token. - auto request = MakeRequest("hotel"); + auto request = MakeRequest("hote"); TEST(ResultsMatch(request->Results(), rules), ()); } @@ -1701,7 +1701,7 @@ UNIT_CLASS_TEST(ProcessorTest, BrandTest) { Rules rules{ExactMatch(countryId, sw)}; - TEST(ResultsMatch("Subway", "en", rules), ()); + TEST(ResultsMatch("Subway cafe", "en", rules), ()); TEST(ResultsMatch("Сабвэй", "ru", rules), ()); TEST(ResultsMatch("サブウェイ", "ja", rules), ()); } diff --git a/search/search_integration_tests/search_edited_features_test.cpp b/search/search_integration_tests/search_edited_features_test.cpp index 9b8c2cc5f1..2d8e5dfcab 100644 --- a/search/search_integration_tests/search_edited_features_test.cpp +++ b/search/search_integration_tests/search_edited_features_test.cpp @@ -37,7 +37,7 @@ UNIT_CLASS_TEST(SearchEditedFeaturesTest, Smoke) Rules const rules = {ExactMatch(id, cafe)}; TEST(ResultsMatch("Eat ", rules), ()); - TEST(ResultsMatch("Bar", rules), ()); + TEST(ResultsMatch("cafe Bar", rules), ()); TEST(ResultsMatch("Drunken", Rules{}), ()); EditFeature(cafeId, [](osm::EditableMapObject & emo) { @@ -45,7 +45,7 @@ UNIT_CLASS_TEST(SearchEditedFeaturesTest, Smoke) }); TEST(ResultsMatch("Eat ", rules), ()); - TEST(ResultsMatch("Bar", rules), ()); + TEST(ResultsMatch("cafe Bar", rules), ()); TEST(ResultsMatch("Drunken", rules), ()); } @@ -84,7 +84,7 @@ UNIT_CLASS_TEST(SearchEditedFeaturesTest, NonamePoi) UNIT_CLASS_TEST(SearchEditedFeaturesTest, SearchInViewport) { TestCity city(m2::PointD(0, 0), "Canterlot", "default", 100 /* rank */); - TestPOI bakery0(m2::PointD(0, 0), "Bakery 0", "default"); + TestPOI bakery0(m2::PointD(0, 0), "French Bakery 0", "default"); TestPOI cornerPost(m2::PointD(100, 100), "Corner Post", "default"); auto & editor = osm::Editor::Instance(); @@ -95,13 +95,13 @@ UNIT_CLASS_TEST(SearchEditedFeaturesTest, SearchInViewport) builder.Add(cornerPost); }); - auto const tmp1 = TestPOI::AddWithEditor(editor, countryId, "bakery1", {1.0, 1.0}); + auto const tmp1 = TestPOI::AddWithEditor(editor, countryId, "French Bakery1", {1.0, 1.0}); TestPOI const & bakery1 = tmp1.first; FeatureID const & id1 = tmp1.second; - auto const tmp2 = TestPOI::AddWithEditor(editor, countryId, "bakery2", {2.0, 2.0}); + auto const tmp2 = TestPOI::AddWithEditor(editor, countryId, "French Bakery2", {2.0, 2.0}); TestPOI const & bakery2 = tmp2.first; FeatureID const & id2 = tmp2.second; - auto const tmp3 = TestPOI::AddWithEditor(editor, countryId, "bakery3", {3.0, 3.0}); + auto const tmp3 = TestPOI::AddWithEditor(editor, countryId, "French Bakery3", {3.0, 3.0}); TestPOI const & bakery3 = tmp3.first; FeatureID const & id3 = tmp3.second; UNUSED_VALUE(id2); @@ -111,28 +111,28 @@ UNIT_CLASS_TEST(SearchEditedFeaturesTest, SearchInViewport) Rules const rules = {ExactMatch(countryId, bakery0), ExactMatch(countryId, bakery1), ExactMatch(countryId, bakery2), ExactMatch(countryId, bakery3)}; - TEST(ResultsMatch("bakery", Mode::Viewport, rules), ()); + TEST(ResultsMatch("french bakery", Mode::Viewport, rules), ()); } SetViewport(m2::RectD(-2.0, -2.0, -1.0, -1.0)); { Rules const rules = {}; - TEST(ResultsMatch("bakery", Mode::Viewport, rules), ()); + TEST(ResultsMatch("french bakery", Mode::Viewport, rules), ()); } SetViewport(m2::RectD(-1.0, -1.0, 1.5, 1.5)); { Rules const rules = {ExactMatch(countryId, bakery0), ExactMatch(countryId, bakery1)}; - TEST(ResultsMatch("bakery", Mode::Viewport, rules), ()); + TEST(ResultsMatch("french bakery", Mode::Viewport, rules), ()); } SetViewport(m2::RectD(1.5, 1.5, 4.0, 4.0)); { Rules const rules = {ExactMatch(countryId, bakery2), ExactMatch(countryId, bakery3)}; - TEST(ResultsMatch("bakery", Mode::Viewport, rules), ()); + TEST(ResultsMatch("french bakery", Mode::Viewport, rules), ()); } editor.DeleteFeature(id1); @@ -142,7 +142,7 @@ UNIT_CLASS_TEST(SearchEditedFeaturesTest, SearchInViewport) { Rules const rules = {ExactMatch(countryId, bakery0), ExactMatch(countryId, bakery2)}; - TEST(ResultsMatch("bakery", Mode::Viewport, rules), ()); + TEST(ResultsMatch("french bakery", Mode::Viewport, rules), ()); } }