Jelajahi Sumber

Fixed test for File class

- fixed test for "canExecute" method by using OS specific binary file
pcmattulat 4 tahun lalu
induk
melakukan
d20ada9726
2 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 7 1
      test/cases/io/FileTest.cpp
  2. TEMPAT SAMPAH
      test/resources/app

+ 7 - 1
test/cases/io/FileTest.cpp

@@ -52,7 +52,13 @@ namespace {
 
   TEST_F(FileTest, canExecute)
   {
-    ls_std::File executableFile {TestHelper::getResourcesFolderLocation() + "app.exe"};
+      #ifdef _WIN32
+        ls_std::File executableFile {TestHelper::getResourcesFolderLocation() + "app.exe"};
+      #endif
+      #ifdef unix
+        ls_std::File executableFile {TestHelper::getResourcesFolderLocation() + "app"};
+      #endif
+
     ASSERT_TRUE(executableFile.canExecute());
   }
 

TEMPAT SAMPAH
test/resources/app