phrocker commented on a change in pull request #585: MINIFICPP-910 - Extend
StringUtils with string join capability
URL: https://github.com/apache/nifi-minifi-cpp/pull/585#discussion_r291440647
##########
File path: libminifi/test/unit/StringUtilsTests.cpp
##########
@@ -91,5 +95,19 @@ TEST_CASE("TestStringUtils::testEnv5", "[test split
classname]") {
std::string expected = "hello world ";
- REQUIRE(expected == StringUtils::replaceEnvironmentVariables(test_string));
+ REQUIRE(expected == replaceEnvironmentVariables(test_string));
+}
+
+TEST_CASE("TestStringUtils::testJoin", "[test string join]") {
+ std::set<std::string> strings = {"3", "2", "1"};
+ REQUIRE(join(",", strings) == "1,2,3");
Review comment:
tests for empty empty sets, and empty delimiters would be nice here, too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services