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


##########
libminifi/test/unit/ExpectedTest.cpp:
##########
@@ -473,7 +473,7 @@ TEST_CASE("expected valueOrElse", 
"[expected][valueOrElse]") {
   REQUIRE(gsl::narrow<int>("hello"sv.size()) == (ex | 
utils::valueOrElse([](const std::string& err) { return 
gsl::narrow<int>(err.size()); })));
   REQUIRE_THROWS_AS(ex | utils::valueOrElse([](std::string){ throw 
std::exception(); }), std::exception);  // 
NOLINT(performance-unnecessary-value-param)
   REQUIRE_THROWS_AS(ex | utils::valueOrElse([](const std::string&) -> int { 
throw std::exception(); }), std::exception);
-  REQUIRE_THROWS_WITH(std::move(ex) | utils::valueOrElse([](std::string&& 
error) -> int { throw std::runtime_error(error); }), "hello");
+  REQUIRE_THROWS_WITH([&] { std::move(ex) | utils::valueOrElse([](const 
std::string& error) -> int { throw std::runtime_error(error); }); }(), "hello");

Review Comment:
   We should turn off the linter for that line then. It needs to be rvalue 
reference for the test to make any sense.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to