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_r291418278
 
 

 ##########
 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");
+
+  std::wstring sep = L"é";
+  std::vector<std::wstring> wstrings = {L"1", L"2"};
+  REQUIRE(join(sep, wstrings) == L"1é2");
+
+  std::list<uint64_t> ulist = {1, 2};
+  REQUIRE(join(sep, ulist) == L"1é2");
 
 Review comment:
   what purpose does join serve here? The semantics of a join seem clear to 
allow strings. 

----------------------------------------------------------------
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

Reply via email to