8#include <catch2/catch.hpp>
12 SECTION(
"Join empty container")
14 std::vector<std::string> container;
15 REQUIRE(
Join(container,
",") ==
"");
18 SECTION(
"Join single item")
20 std::vector<std::string> container {
"item" };
21 REQUIRE(
Join(container,
",") ==
"item");
24 SECTION(
"Join multiple items")
26 std::vector<std::string> container {
"item1",
"item2",
"item3" };
27 REQUIRE(
Join(container,
",") ==
"item1,item2,item3");
33 SECTION(
"Empty prefix")
38 SECTION(
"Empty string")
43 SECTION(
"Prefix longer than string")
48 SECTION(
"Prefix is not a prefix")
53 SECTION(
"Prefix is a prefix")
58 SECTION(
"Prefix matches string")
63 SECTION(
"Case insensitive")
bool IsPrefixedInsensitive(const HayType &hay, const PrefixType &prefix)
bool IsPrefixed(const HayType &hay, const PrefixType &prefix)
ResultType Join(const ContainerType< ResultType, Rest... > &container, const SeparatorType &separator)
TEST_CASE("Join", "[StringUtils]")