mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-31 18:13:44 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -48,10 +48,7 @@ public:
|
||||
}
|
||||
|
||||
void AttachToGroup(Id const & id, GroupId const & group) { m_processor.AttachToGroup(id, group); }
|
||||
void DetachFromGroup(Id const & id, GroupId const & group)
|
||||
{
|
||||
m_processor.DetachFromGroup(id, group);
|
||||
}
|
||||
void DetachFromGroup(Id const & id, GroupId const & group) { m_processor.DetachFromGroup(id, group); }
|
||||
|
||||
Ids Search(string const & query, GroupId const & groupId = kInvalidGroupId)
|
||||
{
|
||||
@@ -78,8 +75,8 @@ protected:
|
||||
Processor m_processor;
|
||||
};
|
||||
|
||||
kml::BookmarkData MakeBookmarkData(string const & name, string const & customName,
|
||||
string const & description, vector<string> const & types)
|
||||
kml::BookmarkData MakeBookmarkData(string const & name, string const & customName, string const & description,
|
||||
vector<string> const & types)
|
||||
{
|
||||
kml::BookmarkData b;
|
||||
b.m_name = {{kml::kDefaultLangCode, name}};
|
||||
@@ -108,14 +105,12 @@ UNIT_CLASS_TEST(BookmarksProcessorTest, Smoke)
|
||||
{"amenity-cafe"} /* types */));
|
||||
|
||||
Add(Id{18}, GroupId{0},
|
||||
MakeBookmarkData(
|
||||
"Silver Mustang Casino" /* name */, "Ag Mustang" /* customName */,
|
||||
"Joyful place, owners Bradley and Rodney are very friendly!" /* description */,
|
||||
{"amenity-casino"} /* types */));
|
||||
MakeBookmarkData("Silver Mustang Casino" /* name */, "Ag Mustang" /* customName */,
|
||||
"Joyful place, owners Bradley and Rodney are very friendly!" /* description */,
|
||||
{"amenity-casino"} /* types */));
|
||||
Add(Id{20}, GroupId{1},
|
||||
MakeBookmarkData("Great Northern Hotel" /* name */, "N Hotel" /* customName */,
|
||||
"Clean place with a reasonable price" /* description */,
|
||||
{"tourism-hotel"} /* types */));
|
||||
"Clean place with a reasonable price" /* description */, {"tourism-hotel"} /* types */));
|
||||
|
||||
TEST_EQUAL(Search("R&R food"), Ids{}, ());
|
||||
GetProcessor().EnableIndexingOfBookmarkGroup(GroupId{0}, true /* enable */);
|
||||
@@ -160,11 +155,9 @@ UNIT_CLASS_TEST(BookmarksProcessorTest, SearchByType)
|
||||
{"amenity-cafe"} /* types */));
|
||||
|
||||
Add(Id{12}, GroupId{0},
|
||||
MakeBookmarkData("" /* name */, "" /* customName */, "" /* description */,
|
||||
{"amenity-cafe"} /* types */));
|
||||
MakeBookmarkData("" /* name */, "" /* customName */, "" /* description */, {"amenity-cafe"} /* types */));
|
||||
|
||||
Add(Id{0}, GroupId{0},
|
||||
MakeBookmarkData("" /* name */, "" /* customName */, "" /* description */, {} /* types */));
|
||||
Add(Id{0}, GroupId{0}, MakeBookmarkData("" /* name */, "" /* customName */, "" /* description */, {} /* types */));
|
||||
|
||||
TEST_EQUAL(Search("cafe", GroupId{0}), Ids({12, 10}), ());
|
||||
TEST_EQUAL(Search("кафе", GroupId{0}), Ids{}, ());
|
||||
@@ -207,4 +200,4 @@ UNIT_CLASS_TEST(BookmarksProcessorTest, IndexDescriptions)
|
||||
TEST_EQUAL(Search("cherry pie"), Ids{}, ());
|
||||
}
|
||||
|
||||
} // namespace bookmarks_processor_tests
|
||||
} // namespace bookmarks_processor_tests
|
||||
|
||||
Reference in New Issue
Block a user