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

Function MakeBookmarkData

libs/search/search_tests/bookmarks_processor_tests.cpp:76–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74};
75
76kml::BookmarkData MakeBookmarkData(string const & name, string const & customName, string const & description,
77 vector<string> const & types)
78{
79 kml::BookmarkData b;
80 b.m_name = {{kml::kDefaultLangCode, name}};
81 b.m_customName = {{kml::kDefaultLangCode, customName}};
82 b.m_description = {{kml::kDefaultLangCode, description}};
83 b.m_featureTypes.reserve(types.size());
84
85 auto const & c = classif();
86 for (auto const & typeString : types)
87 {
88 auto const t = c.GetTypeByPath(strings::Tokenize(typeString, "-"));
89 CHECK_NOT_EQUAL(t, 0, ());
90 b.m_featureTypes.emplace_back(c.GetIndexForType(t));
91 }
92
93 return b;
94}
95
96UNIT_CLASS_TEST(BookmarksProcessorTest, Smoke)
97{

Callers 1

UNIT_CLASS_TESTFunction · 0.85

Calls 6

GetTypeByPathMethod · 0.80
TokenizeFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
emplace_backMethod · 0.45
GetIndexForTypeMethod · 0.45

Tested by

no test coverage detected