diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-12 18:47:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-12 18:47:07 +0300 |
commit | d88285ef4d2b624a0c6a8ef5c2e157ed0248838e (patch) | |
tree | 21c77124f72c023590f0d1b0426eb9357305201e /src/unittests/fs/files.cc | |
parent | 429a545dbd5d0fa992394cf7f4c83d5e972a14b2 (diff) | |
download | mv-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.tar.gz mv-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.tar.bz2 mv-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.tar.xz mv-d88285ef4d2b624a0c6a8ef5c2e157ed0248838e.zip |
Create logger in unit tests before other code.
This need because now sdl may raise error or assert almost at start.
Diffstat (limited to 'src/unittests/fs/files.cc')
-rw-r--r-- | src/unittests/fs/files.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/unittests/fs/files.cc b/src/unittests/fs/files.cc index f3a15b174..935a00f72 100644 --- a/src/unittests/fs/files.cc +++ b/src/unittests/fs/files.cc @@ -20,14 +20,12 @@ #include "unittests/unittests.h" -#include "logger.h" #include "fs/files.h" #include "fs/virtfs/fs.h" #include "fs/virtfs/tools.h" -#include "utils/delete2.h" #include "utils/stringutils.h" #include "resources/resourcemanager/resourcemanager.h" @@ -36,7 +34,6 @@ TEST_CASE("Files renameFile", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -68,13 +65,10 @@ TEST_CASE("Files renameFile", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files existsLocal", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); REQUIRE(Files::existsLocal(VirtFs::getPath("help/about.txt")) == true); @@ -83,13 +77,10 @@ TEST_CASE("Files existsLocal", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files loadTextFileString", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); REQUIRE(VirtFs::loadTextFileString("test/simplefile.txt") == @@ -97,13 +88,10 @@ TEST_CASE("Files loadTextFileString", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files loadTextFile", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -115,13 +103,10 @@ TEST_CASE("Files loadTextFile", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files saveTextFile", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -140,13 +125,10 @@ TEST_CASE("Files saveTextFile", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files copyFile1", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -172,13 +154,10 @@ TEST_CASE("Files copyFile1", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files loadTextFileLocal", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -196,13 +175,10 @@ TEST_CASE("Files loadTextFileLocal", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } TEST_CASE("Files getFilesInDir", "") { - logger = new Logger(); VirtFs::mountDirSilent("data", Append_false); VirtFs::mountDirSilent("../data", Append_false); @@ -228,6 +204,4 @@ TEST_CASE("Files getFilesInDir", "") ResourceManager::deleteInstance(); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); - delete2(logger); -// VirtFs::deinit(); } |