From 537a7180a0d5132c11636c4fd8b1450cd99d352c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 26 Jul 2023 10:49:23 +0100 Subject: [Rework] Use clang-format to unify formatting in all sources No meaningful changes. --- src/libutil/cxx/util_tests.cxx | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'src/libutil/cxx/util_tests.cxx') 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> 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> 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 -- cgit v1.2.3