#include #include #include #include "gtest/gtest.h" #include "utils/algorithm.hpp" using vec = std::vector; using namespace std::string_literals; using namespace utils; TEST(Algorithm, Reversed) { EXPECT_EQ(Reversed(""s), ""s); EXPECT_EQ(Reversed("abc"s), "cba"s); EXPECT_EQ(Reversed(std::vector({1, 2, 3, 4})), std::vector({4, 3, 2, 1})); EXPECT_EQ(Reversed(std::list({"ab"s, "cd"s})), std::list({"cd"s, "ab"s})); }