diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-01-04 18:25:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-04 18:25:48 +0300 |
commit | 9fefb2942865846ccb7dbdac4ebd4515b8c851a2 (patch) | |
tree | c3e805eb002d03c286de2a3fe37f450f6279f82c /src/utils/files_unittest.cc | |
parent | 76ad2d74012c408788473c3b495076c96666b27c (diff) | |
download | ManaVerse-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.tar.gz ManaVerse-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.tar.bz2 ManaVerse-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.tar.xz ManaVerse-9fefb2942865846ccb7dbdac4ebd4515b8c851a2.zip |
Add physfs deinit function for unit tests. But not using it for now.
Diffstat (limited to 'src/utils/files_unittest.cc')
-rw-r--r-- | src/utils/files_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc index 84ddb0df1..77a7017f6 100644 --- a/src/utils/files_unittest.cc +++ b/src/utils/files_unittest.cc @@ -64,6 +64,7 @@ TEST_CASE("Files renameFile") delete [] buf; delete [] buf2; ResourceManager::deleteInstance(); +// PhysFs::deinit(); } TEST_CASE("Files existsLocal") @@ -78,6 +79,7 @@ TEST_CASE("Files existsLocal") REQUIRE_FALSE(Files::existsLocal(Files::getPath("help/about1.txt"))); REQUIRE_FALSE(Files::existsLocal(Files::getPath("help1/about.txt"))); ResourceManager::deleteInstance(); +// PhysFs::deinit(); } TEST_CASE("Files loadTextFileString") @@ -91,6 +93,7 @@ TEST_CASE("Files loadTextFileString") REQUIRE(Files::loadTextFileString("test/simplefile.txt") == "this is test \nfile."); ResourceManager::deleteInstance(); +// PhysFs::deinit(); } TEST_CASE("Files loadTextFile") @@ -108,6 +111,7 @@ TEST_CASE("Files loadTextFile") REQUIRE(lines[0] == "this is test "); REQUIRE(lines[1] == "file."); ResourceManager::deleteInstance(); +// PhysFs::deinit(); } TEST_CASE("Files saveTextFile") @@ -126,6 +130,7 @@ TEST_CASE("Files saveTextFile") ::remove((dir + "/tempfile.txt").c_str()); REQUIRE(data == "test line\ntext line2\n"); ResourceManager::deleteInstance(); +// PhysFs::deinit(); } TEST_CASE("Files getFilesInDir") @@ -155,4 +160,5 @@ TEST_CASE("Files getFilesInDir") REQUIRE(list[3] == "perserver/default/features.xml"); REQUIRE(list[4] == "perserver/default/weapons.xml"); ResourceManager::deleteInstance(); +// PhysFs::deinit(); } |