Format all the memgraph and test source files (#97)
This commit is contained in:
@@ -15,8 +15,7 @@ using namespace utils;
|
||||
|
||||
TEST(Algorithm, PrintIterable) {
|
||||
// Checkss both variants of the function (using iterators and collections)
|
||||
auto check = [](const std::vector<int> &iterable,
|
||||
const std::string &expected_output) {
|
||||
auto check = [](const std::vector<int> &iterable, const std::string &expected_output) {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
PrintIterable(oss, iterable, ", ");
|
||||
@@ -36,9 +35,7 @@ TEST(Algorithm, PrintIterable) {
|
||||
|
||||
{
|
||||
// Use custom streamer
|
||||
auto map_streamer = [](auto &stream, const auto &item) {
|
||||
stream << item.first << ": " << item.second;
|
||||
};
|
||||
auto map_streamer = [](auto &stream, const auto &item) { stream << item.first << ": " << item.second; };
|
||||
std::ostringstream oss;
|
||||
std::map<std::string, std::string> map;
|
||||
map.emplace("a", "x");
|
||||
@@ -51,8 +48,6 @@ TEST(Algorithm, PrintIterable) {
|
||||
TEST(Algorithm, Reversed) {
|
||||
EXPECT_EQ(Reversed(""s), ""s);
|
||||
EXPECT_EQ(Reversed("abc"s), "cba"s);
|
||||
EXPECT_EQ(Reversed(std::vector<int>({1, 2, 3, 4})),
|
||||
std::vector<int>({4, 3, 2, 1}));
|
||||
EXPECT_EQ(Reversed(std::list<std::string>({"ab"s, "cd"s})),
|
||||
std::list<std::string>({"cd"s, "ab"s}));
|
||||
EXPECT_EQ(Reversed(std::vector<int>({1, 2, 3, 4})), std::vector<int>({4, 3, 2, 1}));
|
||||
EXPECT_EQ(Reversed(std::list<std::string>({"ab"s, "cd"s})), std::list<std::string>({"cd"s, "ab"s}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user