summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-02 05:18:37 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-02 05:18:37 +0300
commit22a2c48a263c67ab3418c22a88cec67e5c1d318c (patch)
tree5e1685b0ec799dcaf52dd87bafbdafe7421943f9 /src
parent4b1ca08f26152fbcfb5eb838d271fdd88c381eca (diff)
downloadplus-22a2c48a263c67ab3418c22a88cec67e5c1d318c.tar.gz
plus-22a2c48a263c67ab3418c22a88cec67e5c1d318c.tar.bz2
plus-22a2c48a263c67ab3418c22a88cec67e5c1d318c.tar.xz
plus-22a2c48a263c67ab3418c22a88cec67e5c1d318c.zip
Fix tests failure in physfs deinit.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/browserbox_unittest.cc2
-rw-r--r--src/gui/windowmanager_unittest.cc8
-rw-r--r--src/integrity_unittest.cc4
-rw-r--r--src/resources/dye/dye_unittest.cc2
-rw-r--r--src/resources/dye/dyepalette_unittest.cc2
-rw-r--r--src/resources/map/speciallayer_unittest.cc2
-rw-r--r--src/resources/resourcemanager/resourcemanager_unittest.cc2
-rw-r--r--src/resources/sprite/animatedsprite_unittest.cc2
-rw-r--r--src/utils/chatutils_unittest.cc2
-rw-r--r--src/utils/translation/poparser_unittest.cc2
-rw-r--r--src/utils/xml_unittest.cc3
-rw-r--r--src/utils/xmlutils_unittest.cc6
12 files changed, 17 insertions, 20 deletions
diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc
index 0dd8af585..c4810a188 100644
--- a/src/gui/widgets/browserbox_unittest.cc
+++ b/src/gui/widgets/browserbox_unittest.cc
@@ -174,9 +174,9 @@ TEST_CASE("BrowserBox tests", "browserbox")
delete Widget::getGloablFont();
Widget::setGlobalFont(nullptr);
delete box;
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 38471370d..638b2c5b6 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -685,15 +685,15 @@ TEST_CASE("Windows tests", "windowmanager")
delete2(localPlayer);
delete2(userPalette);
+ VirtFs::removeDirFromSearchPath("data");
+ VirtFs::removeDirFromSearchPath("../data");
+ VirtFs::removeDirFromSearchPath("data/test");
+ VirtFs::removeDirFromSearchPath("../data/test");
delete2(client);
delete2(serverFeatures);
delete2(inventoryHandler);
delete2(charServerHandler);
delete2(playerHandler);
- VirtFs::removeDirFromSearchPath("data");
- VirtFs::removeDirFromSearchPath("../data");
- VirtFs::removeDirFromSearchPath("data/test");
- VirtFs::removeDirFromSearchPath("../data/test");
delete2(logger);
// VirtFs::deinit();
diff --git a/src/integrity_unittest.cc b/src/integrity_unittest.cc
index 0095f22ca..d2f0d498b 100644
--- a/src/integrity_unittest.cc
+++ b/src/integrity_unittest.cc
@@ -510,11 +510,9 @@ TEST_CASE("integrity tests", "integrity")
resourceManager->cleanOrphans(true);
- delete client;
- client = nullptr;
-
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/resources/dye/dye_unittest.cc b/src/resources/dye/dye_unittest.cc
index cc368d865..6b2e01e60 100644
--- a/src/resources/dye/dye_unittest.cc
+++ b/src/resources/dye/dye_unittest.cc
@@ -2393,11 +2393,11 @@ TEST_CASE("Dye real dye")
{
dyeCheck("|A:#0000FFFF,FF000050", "arrow_up_A.png");
}
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
VirtFs::removeDirFromSearchPath("data/test");
VirtFs::removeDirFromSearchPath("../data/test");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc
index 7df69e952..3fdcfb1ff 100644
--- a/src/resources/dye/dyepalette_unittest.cc
+++ b/src/resources/dye/dyepalette_unittest.cc
@@ -383,11 +383,11 @@ TEST_CASE("DyePalette tests")
REQUIRE(palette.mColors[0].value[2] == 46);
REQUIRE(palette.mColors[0].value[3] == 0x77);
}
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
VirtFs::removeDirFromSearchPath("data/test");
VirtFs::removeDirFromSearchPath("../data/test");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/resources/map/speciallayer_unittest.cc b/src/resources/map/speciallayer_unittest.cc
index 223d05b4e..a38adbd96 100644
--- a/src/resources/map/speciallayer_unittest.cc
+++ b/src/resources/map/speciallayer_unittest.cc
@@ -261,8 +261,8 @@ TEST_CASE("SpecialLayer updateCache")
delete layer;
resourceManager->cleanOrphans();
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
}
diff --git a/src/resources/resourcemanager/resourcemanager_unittest.cc b/src/resources/resourcemanager/resourcemanager_unittest.cc
index fa0a07b76..ec3ac01d1 100644
--- a/src/resources/resourcemanager/resourcemanager_unittest.cc
+++ b/src/resources/resourcemanager/resourcemanager_unittest.cc
@@ -659,9 +659,9 @@ TEST_CASE("resourcemanager", "resourcemanager")
delete resourceManager;
resourceManager = safeResman;
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc
index 85a1c3e87..604ae264f 100644
--- a/src/resources/sprite/animatedsprite_unittest.cc
+++ b/src/resources/sprite/animatedsprite_unittest.cc
@@ -181,9 +181,9 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
delete sprite2;
}
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc
index 421798227..9f1188bd0 100644
--- a/src/utils/chatutils_unittest.cc
+++ b/src/utils/chatutils_unittest.cc
@@ -237,9 +237,9 @@ TEST_CASE("chatutils replaceVars")
delete2(actorManager);
delete2(localPlayer);
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/translation/poparser_unittest.cc b/src/utils/translation/poparser_unittest.cc
index 9182bebbc..77d958885 100644
--- a/src/utils/translation/poparser_unittest.cc
+++ b/src/utils/translation/poparser_unittest.cc
@@ -122,9 +122,9 @@ TEST_CASE("PoParser tests", "PoParser")
delete parser;
delete dict;
}
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc
index f5211bcb5..3dbda4a1c 100644
--- a/src/utils/xml_unittest.cc
+++ b/src/utils/xml_unittest.cc
@@ -358,10 +358,9 @@ TEST_CASE("xml doc")
::remove(tempXmlName);
}
delete2(theme);
- delete2(client);
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
-
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
diff --git a/src/utils/xmlutils_unittest.cc b/src/utils/xmlutils_unittest.cc
index dff0b130c..4575854b4 100644
--- a/src/utils/xmlutils_unittest.cc
+++ b/src/utils/xmlutils_unittest.cc
@@ -77,10 +77,10 @@ TEST_CASE("xmlutils readXmlIntVector 1")
REQUIRE(0 == arr[2]);
REQUIRE(1 == arr[3]);
REQUIRE(1 == arr[4]);
- delete2(client);
ResourceManager::deleteInstance();
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
@@ -123,10 +123,10 @@ TEST_CASE("xmlutils readXmlStringMap 1")
REQUIRE(arr["Kitty"] == "0");
REQUIRE(arr["xD"] == "1");
REQUIRE(arr["Metal"] == "26");
- delete2(client);
ResourceManager::deleteInstance();
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}
@@ -171,12 +171,12 @@ TEST_CASE("xmlutils readXmlIntMap 1")
REQUIRE(arr[1] == 2);
REQUIRE(arr[10] == 20);
REQUIRE(arr[3] == 0);
- delete2(client);
ResourceManager::deleteInstance();
VirtFs::removeDirFromSearchPath("data/test");
VirtFs::removeDirFromSearchPath("../data/test");
VirtFs::removeDirFromSearchPath("data");
VirtFs::removeDirFromSearchPath("../data");
+ delete2(client);
delete2(logger);
// VirtFs::deinit();
}