summaryrefslogtreecommitdiff
path: root/src/fs/virtfsphys_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-27 18:16:39 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-27 18:16:39 +0300
commit6388446b85e1fa5deccc6d5c1683fba88ef53d99 (patch)
treedaaa6c764a34aece74de45dddc5b1e276d61774d /src/fs/virtfsphys_unittest.cc
parent757069bdedabbd904e56d153e2e858db2a2cf2f1 (diff)
downloadplus-6388446b85e1fa5deccc6d5c1683fba88ef53d99.tar.gz
plus-6388446b85e1fa5deccc6d5c1683fba88ef53d99.tar.bz2
plus-6388446b85e1fa5deccc6d5c1683fba88ef53d99.tar.xz
plus-6388446b85e1fa5deccc6d5c1683fba88ef53d99.zip
Add functions pointers into VirtFile.
From VirtFs call if possible pointer from VirtFile.
Diffstat (limited to 'src/fs/virtfsphys_unittest.cc')
-rw-r--r--src/fs/virtfsphys_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fs/virtfsphys_unittest.cc b/src/fs/virtfsphys_unittest.cc
index efb37e2d7..93f86db64 100644
--- a/src/fs/virtfsphys_unittest.cc
+++ b/src/fs/virtfsphys_unittest.cc
@@ -32,6 +32,7 @@
TEST_CASE("VirtFsPhys dirSeparator")
{
+ VirtFsPhys::initFuncs();
REQUIRE(VirtFs::getDirSeparator() != nullptr);
REQUIRE(VirtFsPhys::getDirSeparator() ==
std::string(VirtFs::getDirSeparator()));
@@ -43,16 +44,19 @@ TEST_CASE("VirtFsPhys dirSeparator")
TEST_CASE("VirtFsPhys getBaseDir")
{
+ VirtFsPhys::initFuncs();
REQUIRE(VirtFsPhys::getBaseDir() != nullptr);
}
TEST_CASE("VirtFsPhys getUserDir")
{
+ VirtFsPhys::initFuncs();
REQUIRE(VirtFsPhys::getUserDir() != nullptr);
}
TEST_CASE("VirtFsPhys exists")
{
+ VirtFsPhys::initFuncs();
logger = new Logger();
VirtFsPhys::addDirToSearchPath("data", Append_false);
VirtFsPhys::addDirToSearchPath("../data", Append_false);
@@ -111,6 +115,7 @@ static void removeTemp(StringVect &restrict list)
TEST_CASE("VirtFsPhys enumerateFiles1")
{
+ VirtFsPhys::initFuncs();
logger = new Logger;
VirtFsPhys::addDirToSearchPath("data", Append_false);
@@ -147,6 +152,7 @@ TEST_CASE("VirtFsPhys enumerateFiles1")
TEST_CASE("VirtFsPhys enumerateFiles2")
{
+ VirtFsPhys::initFuncs();
logger = new Logger;
VirtFsPhys::addDirToSearchPath("data/test/dir1",
@@ -168,6 +174,7 @@ TEST_CASE("VirtFsPhys enumerateFiles2")
TEST_CASE("VirtFsPhys isDirectory")
{
+ VirtFsPhys::initFuncs();
logger = new Logger();
VirtFsPhys::addDirToSearchPath("data", Append_false);
VirtFsPhys::addDirToSearchPath("../data", Append_false);
@@ -226,6 +233,7 @@ TEST_CASE("VirtFsPhys isDirectory")
TEST_CASE("VirtFsPhys openRead")
{
+ VirtFsPhys::initFuncs();
logger = new Logger();
VirtFsPhys::addDirToSearchPath("data", Append_false);
VirtFsPhys::addDirToSearchPath("../data", Append_false);
@@ -298,6 +306,7 @@ TEST_CASE("VirtFsPhys removeZipFromSearchPath")
TEST_CASE("VirtFsPhys getRealDir")
{
+ VirtFsPhys::initFuncs();
logger = new Logger();
REQUIRE(VirtFsPhys::getRealDir(".") == "");
REQUIRE(VirtFsPhys::getRealDir("..") == "");
@@ -382,6 +391,7 @@ TEST_CASE("VirtFsPhys getRealDir")
TEST_CASE("VirtFsPhys permitLinks")
{
+ VirtFsPhys::initFuncs();
logger = new Logger();
VirtFsPhys::addDirToSearchPath("data", Append_false);
VirtFsPhys::addDirToSearchPath("../data", Append_false);
@@ -415,6 +425,7 @@ TEST_CASE("VirtFsPhys permitLinks")
TEST_CASE("VirtFsPhys read")
{
+ VirtFsPhys::initFuncs();
logger = new Logger();
VirtFsPhys::addDirToSearchPath("data", Append_false);
VirtFsPhys::addDirToSearchPath("../data", Append_false);