diff --git a/tests/common/StringHelperTest.cpp b/tests/common/StringHelperTest.cpp index 503f63aa3..f8089cb67 100644 --- a/tests/common/StringHelperTest.cpp +++ b/tests/common/StringHelperTest.cpp @@ -34,6 +34,15 @@ TEST_F(StringHelperTest, splitStringByNewLine) ASSERT_EQ(result[3], "source"); } +TEST_F(StringHelperTest, joinStringViewsWithoutString) +{ + const std::vector input{}; + + const auto result = common::join(input); + + ASSERT_EQ(result, ""); +} + TEST_F(StringHelperTest, joinStringViewsIntoVectorBySpace) { const std::vector input{"Join", "faker", "development!"}; @@ -52,6 +61,15 @@ TEST_F(StringHelperTest, joinStringViewsIntoVectorByNewLine) ASSERT_EQ(result, "Join\nfaker\ndevelopment!"); } +TEST_F(StringHelperTest, joinStringsWithoutString) +{ + const std::vector input{}; + + const auto result = common::joinString(input); + + ASSERT_EQ(result, ""); +} + TEST_F(StringHelperTest, joinStringsIntoVectorBySpace) { const std::vector input{"Join", "faker", "development!"};