lordgamez commented on code in PR #1615:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1615#discussion_r1276019526


##########
libminifi/test/unit/WindowsCertStoreLocationTests.cpp:
##########
@@ -51,4 +51,10 @@ TEST_CASE("CurrentUser and LocalMachine are among the 
allowed values of WindowsC
   CHECK_FALSE(ranges::contains(allowed_locations, "SomebodyElsesComputer"));
 }
 
+#else
+#include "../Catch.h"
+TEST_CASE("WindowsCertStoreLocation") {

Review Comment:
   This could be removed as well.



##########
libminifi/test/unit/FileUtilsTests.cpp:
##########
@@ -186,9 +184,8 @@ TEST_CASE("TestFileUtils::addFilesMatchingExtension", 
"[TestAddFilesMatchingExte
 
 TEST_CASE("FileUtils::last_write_time and last_write_time_point work", 
"[last_write_time][last_write_time_point]") {
   using namespace std::chrono;
-  namespace fs = std::filesystem;
 
-  fs::file_time_type time_before_write = file_clock::now();
+  file_clock::time_point time_before_write = file_clock::now();

Review Comment:
   Just nitpicking, but it would be simpler to just use `auto` for these time 
points.



##########
libminifi/test/unit/OsUtilTests.cpp:
##########
@@ -39,6 +39,10 @@ TEST_CASE("Test userIdToUsername for well-known SIDs", 
"[OsUtils]") {
   CHECK_FALSE(minifi::utils::OsUtils::userIdToUsername("S-1-3-4").empty());
   CHECK_FALSE(minifi::utils::OsUtils::userIdToUsername("S-1-5-80-0").empty());
 }
+#else
+TEST_CASE("OsUtilTests") {

Review Comment:
   We could also remove this from the file list in cmake instead.



##########
extensions/standard-processors/tests/unit/ExecuteProcessTests.cpp:
##########
@@ -170,6 +170,9 @@ TEST_CASE_METHOD(ExecuteProcessTestsFixture, 
"ExecuteProcess buffer long outputs
   CHECK(success_flow_files[0]->getAttribute("command") == command);
   CHECK(success_flow_files[0]->getAttribute("command.arguments") == arguments);
 }
-
+#else
+TEST_CASE("ExecuteProcessTests") {
+  SUCCEED("To avoid empty test executable");
+}

Review Comment:
   It may be better to remove the `#ifdef` and remove the test file in the 
`CMakeLists.txt` with `list(REMOVE_ITEM ...)` if we are building on Windows.



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