summaryrefslogtreecommitdiff
path: root/src/utils/files_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/files_unittest.cc')
-rw-r--r--src/utils/files_unittest.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/utils/files_unittest.cc b/src/utils/files_unittest.cc
index 01996bd74..71e6e89c7 100644
--- a/src/utils/files_unittest.cc
+++ b/src/utils/files_unittest.cc
@@ -34,8 +34,8 @@ TEST_CASE("Files renameFile")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
const int sz = 1234567;
char *buf = new char[sz];
@@ -71,8 +71,8 @@ TEST_CASE("Files existsLocal")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
REQUIRE(Files::existsLocal(Files::getPath("help/about.txt")) == true);
REQUIRE_FALSE(Files::existsLocal(Files::getPath("help/about1.txt")));
REQUIRE_FALSE(Files::existsLocal(Files::getPath("help1/about.txt")));
@@ -85,8 +85,8 @@ TEST_CASE("Files loadTextFileString")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
REQUIRE(Files::loadTextFileString("test/simplefile.txt") ==
"this is test \nfile.");
ResourceManager::deleteInstance();
@@ -98,8 +98,8 @@ TEST_CASE("Files loadTextFile")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
StringVect lines;
Files::loadTextFile("test/simplefile.txt", lines);
@@ -115,8 +115,8 @@ TEST_CASE("Files saveTextFile")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
const std::string dir = Files::getPath("test");
REQUIRE(dir.size() > 0);
@@ -133,8 +133,8 @@ TEST_CASE("Files getFilesInDir")
dirSeparator = "/";
logger = new Logger();
ResourceManager::init();
- resourceManager->addToSearchPath("data", Append_false);
- resourceManager->addToSearchPath("../data", Append_false);
+ VirtFs::addDirToSearchPath("data", Append_false);
+ VirtFs::addDirToSearchPath("../data", Append_false);
StringVect list;
Files::getFilesInDir("test",