MCPcopy Create free account
hub / github.com/comaps/comaps / CheckPlace

Function CheckPlace

libs/map/map_tests/bookmarks_test.cpp:473–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471namespace
472{
473void CheckPlace(Framework const & fm, std::shared_ptr<MwmInfo> const & mwmInfo, double lat, double lon,
474 StringUtf8Multilang const & streetNames, std::string const & houseNumber)
475{
476 auto const info = fm.GetAddressAtPoint(mercator::FromLatLon(lat, lon));
477
478 std::optional<std::string> const streetName = localisation::TranslatedFeatureName(streetNames, mwmInfo->GetRegionData().GetLanguages()).m_primary;
479 if (streetName.has_value())
480 TEST_EQUAL(info.GetStreetName(), streetName.value(), ());
481 TEST_EQUAL(info.GetHouseNumber(), houseNumber, ());
482}
483} // namespace
484
485UNIT_TEST(Bookmarks_AddressInfo)

Callers 1

UNIT_TESTFunction · 0.85

Calls 8

TranslatedFeatureNameFunction · 0.85
GetAddressAtPointMethod · 0.80
GetRegionDataMethod · 0.80
has_valueMethod · 0.80
GetHouseNumberMethod · 0.80
FromLatLonFunction · 0.50
GetLanguagesMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected