Sfoglia il codice sorgente

Fixed test for File class

- fixed "getSize" test, since on linux machines new line character is
 different than on windows machines
pcmattulat 4 anni fa
parent
commit
2db79018fa
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      test/cases/io/FileTest.cpp

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

@@ -111,7 +111,13 @@ namespace {
   TEST_F(FileTest, getSize)
   {
     ls_std::File file {this->fileLocation};
-    ASSERT_EQ(8, file.getSize());
+
+    #ifdef _WIN32
+      ASSERT_EQ(8, file.getSize());
+    #endif
+    #ifdef unix
+      ASSERT_EQ(7, file.getSize());
+    #endif
   }
 
   TEST_F(FileTest, isDirectory)