bakaid commented on a change in pull request #731: MINIFICPP-1096 fix 
BackTrace, OOB indexing, tests, appveyor reporting
URL: https://github.com/apache/nifi-minifi-cpp/pull/731#discussion_r385701729
 
 

 ##########
 File path: extensions/standard-processors/tests/unit/ProcessorTests.cpp
 ##########
 @@ -180,19 +184,37 @@ TEST_CASE("Test GetFile Ignore", "[getfileCreate3]") {
   auto records = reporter->getEvents();
   record = session->get();
   REQUIRE(record == nullptr);
-  REQUIRE(records.size() == 0);
+  REQUIRE(records.empty());
 
-  std::fstream file;
-  std::stringstream ss;
-  ss << dir << utils::file::FileUtils::get_separator() << ".filewithoutanext";
-  file.open(ss.str(), std::ios::out);
-  file << "tempFile";
-  file.close();
+  const std::string hidden_file_name = [&] {
+    std::stringstream ss;
+    ss << dir << utils::file::FileUtils::get_separator() << 
".filewithoutanext";
+    return ss.str();
+  }();
+  {
+    std::ofstream file{ hidden_file_name };
+    file << "tempFile";
+  }
+
+#ifdef WIN32
+  {
 
 Review comment:
   Yeah, that's fine.

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