diff options
author | MacroFake <falke.marco@gmail.com> | 2022-08-19 19:28:22 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-08-24 10:15:11 +0200 |
commit | fa1c71695593d5d3b264c2504baca318fc46d580 (patch) | |
tree | 503f4b9a3083d9428dd836e7518b1694334d4300 /src/test | |
parent | faf8da3c8da275c104330ef2743c5a062bea2f4b (diff) |
Make Join() util work with any container type
Also, remove helper that is only used in tests.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/util_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index a16280f8c6..921cd37327 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -244,9 +244,9 @@ BOOST_AUTO_TEST_CASE(util_Join) // Version with unary operator const auto op_upper = [](const std::string& s) { return ToUpper(s); }; - BOOST_CHECK_EQUAL(Join<std::string>({}, ", ", op_upper), ""); - BOOST_CHECK_EQUAL(Join<std::string>({"foo"}, ", ", op_upper), "FOO"); - BOOST_CHECK_EQUAL(Join<std::string>({"foo", "bar"}, ", ", op_upper), "FOO, BAR"); + BOOST_CHECK_EQUAL(Join(std::list<std::string>{}, ", ", op_upper), ""); + BOOST_CHECK_EQUAL(Join(std::list<std::string>{"foo"}, ", ", op_upper), "FOO"); + BOOST_CHECK_EQUAL(Join(std::list<std::string>{"foo", "bar"}, ", ", op_upper), "FOO, BAR"); } BOOST_AUTO_TEST_CASE(util_ReplaceAll) |