aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/cxx/util_tests.cxx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-07-26 10:49:23 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-07-26 10:49:23 +0100
commit537a7180a0d5132c11636c4fd8b1450cd99d352c (patch)
treefb9f8c84955a411bdffbd6371ea32f2716fb3687 /src/libutil/cxx/util_tests.cxx
parent5fd7a90fdaa33f52c59bdb0ca84451e5c1e22365 (diff)
downloadrspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.tar.gz
rspamd-537a7180a0d5132c11636c4fd8b1450cd99d352c.zip
[Rework] Use clang-format to unify formatting in all sources
No meaningful changes.
Diffstat (limited to 'src/libutil/cxx/util_tests.cxx')
-rw-r--r--src/libutil/cxx/util_tests.cxx36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/libutil/cxx/util_tests.cxx b/src/libutil/cxx/util_tests.cxx
index 6d7f4dd55..2b3092779 100644
--- a/src/libutil/cxx/util_tests.cxx
+++ b/src/libutil/cxx/util_tests.cxx
@@ -22,23 +22,25 @@
using namespace rspamd;
using namespace std::literals::string_view_literals;
-TEST_SUITE("cxx utils") {
-TEST_CASE("string_split_on") {
- std::tuple<std::string_view, char, std::pair<std::string_view, std::string_view>> cases[] = {
- {"test test"sv, ' ', std::pair{"test"sv, "test"sv}},
- {"test test"sv, ' ', std::pair{"test"sv, "test"sv}},
- {"test test "sv, ' ', std::pair{"test"sv, "test "sv}},
- {"testtest "sv, ' ', std::pair{"testtest"sv, ""sv}},
- {" testtest "sv, ' ', std::pair{""sv, "testtest "sv}},
- {"testtest"sv, ' ', std::pair{"testtest"sv, ""sv}},
- {""sv, ' ', std::pair{""sv, ""sv}},
- };
+TEST_SUITE("cxx utils")
+{
+ TEST_CASE("string_split_on")
+ {
+ std::tuple<std::string_view, char, std::pair<std::string_view, std::string_view>> cases[] = {
+ {"test test"sv, ' ', std::pair{"test"sv, "test"sv}},
+ {"test test"sv, ' ', std::pair{"test"sv, "test"sv}},
+ {"test test "sv, ' ', std::pair{"test"sv, "test "sv}},
+ {"testtest "sv, ' ', std::pair{"testtest"sv, ""sv}},
+ {" testtest "sv, ' ', std::pair{""sv, "testtest "sv}},
+ {"testtest"sv, ' ', std::pair{"testtest"sv, ""sv}},
+ {""sv, ' ', std::pair{""sv, ""sv}},
+ };
- for (const auto& c : cases) {
- auto res = string_split_on(std::get<0>(c), std::get<1>(c));
- auto expected = std::get<2>(c);
- CHECK(res.first == expected.first);
- CHECK(res.second == expected.second);
+ for (const auto &c: cases) {
+ auto res = string_split_on(std::get<0>(c), std::get<1>(c));
+ auto expected = std::get<2>(c);
+ CHECK(res.first == expected.first);
+ CHECK(res.second == expected.second);
+ }
}
-}
} \ No newline at end of file