adamdebreceni commented on code in PR #1354:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1354#discussion_r923485879
##########
libminifi/test/unit/FileUtilsTests.cpp:
##########
@@ -80,17 +80,17 @@ TEST_CASE("TestFileUtils::get_child_path",
"[TestGetChildPath]") {
REQUIRE("bar\\" == FileUtils::get_child_path("C:\\foo\\bar\\"));
REQUIRE("foo" == FileUtils::get_child_path("C:\\foo"));
REQUIRE("foo\\" == FileUtils::get_child_path("C:\\foo\\"));
- REQUIRE("" == FileUtils::get_child_path("C:\\"));
- REQUIRE("" == FileUtils::get_child_path("C:\\\\"));
+ REQUIRE(FileUtils::get_child_path("C:\\").empty());
+ REQUIRE(FileUtils::get_child_path("C:\\\\").empty());
#else
REQUIRE("bar" == FileUtils::get_child_path("foo/bar"));
REQUIRE("bar/" == FileUtils::get_child_path("foo/bar/"));
REQUIRE("bar" == FileUtils::get_child_path("/foo/bar"));
REQUIRE("bar/" == FileUtils::get_child_path("/foo/bar/"));
REQUIRE("foo" == FileUtils::get_child_path("/foo"));
REQUIRE("foo/" == FileUtils::get_child_path("/foo/"));
- REQUIRE("" == FileUtils::get_child_path("/"));
- REQUIRE("" == FileUtils::get_child_path("//"));
+ REQUIRE(FileUtils::get_child_path("/").empty());
+ REQUIRE(FileUtils::get_child_path("//").empty());
Review Comment:
I don't know about this change, `REQUIRE` destructures the expression and
the error message is along the lines of "equality comparison failed, X != Y",
with this change I think the error message will simply say that the expression
is fails I think
--
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]