浏览代码

Fixed test for File class

- fixed "getSize" test, since on linux machines new line character is
 different than on windows machines
pcmattulat 4 年之前
父节点
当前提交
2db79018fa
共有 1 个文件被更改,包括 7 次插入1 次删除
  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)