szaszm commented on code in PR #1680:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1680#discussion_r1362018977


##########
libminifi/test/unit/StringUtilsTests.cpp:
##########
@@ -469,15 +476,16 @@ TEST_CASE("test string::testJoinPackWstring", "[test 
join_pack wstring]") {
       == L"rvalue c string, c string, rval std::string, std::string, 
std::string_view, char array");
 }
 
-/* doesn't and shouldn't compile
-TEST_CASE("test string::testJoinPackNegative", "[test join_pack negative]") {
-  std::wstring stdstr = L"std::string";
-  const wchar_t* cstr = L"c string";
-  const wchar_t carr[] = L"char array";
-  REQUIRE(string::join_pack("rvalue c string, ", cstr, std::string{ ", rval 
std::string, " }, stdstr, ", ", carr)
-              == "rvalue c string, c string, rval std::string, std::string, 
char array");
+namespace detail {
+template<typename... Strs>
+concept join_pack_works_with_args = requires(Strs... strs) {
+  string::join_pack(strs...);
+};
+}  // namespace detail
+
+TEST_CASE("test string::join_pack can't combine different char types", "[test 
join_pack negative][different char types]") {
+  STATIC_REQUIRE(!detail::join_pack_works_with_args<const char*&&, const 
wchar_t*&, std::string, std::wstring, const char*, const wchar_t[]>);  // 
NOLINT: testing C array

Review Comment:
   changed these in 
[e26bfc4](https://github.com/apache/nifi-minifi-cpp/pull/1680/commits/e26bfc40fc7da54375ea20168c502514a8fec259)



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

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to