summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-18 01:55:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-18 01:55:23 +0300
commitbe8edccc37bb2ce0b17cc950129cd57d65aac49a (patch)
tree00badff35ec2ea5797043ec2b4bcec5496c883e2
parent91cd49664d1dbe1bdea78541fcdf4bd3ec94f22a (diff)
downloadplus-be8edccc37bb2ce0b17cc950129cd57d65aac49a.tar.gz
plus-be8edccc37bb2ce0b17cc950129cd57d65aac49a.tar.bz2
plus-be8edccc37bb2ce0b17cc950129cd57d65aac49a.tar.xz
plus-be8edccc37bb2ce0b17cc950129cd57d65aac49a.zip
Fix unit tests after default theme was changed.
-rw-r--r--src/gui/widgets/browserbox_unittest.cc1
-rw-r--r--src/gui/windowmanager_unittest.cc2
-rw-r--r--src/resources/dye/dyepalette_unittest.cc1
-rw-r--r--src/resources/sprite/animatedsprite_unittest.cc1
-rw-r--r--src/utils/chatutils_unittest.cc1
-rw-r--r--src/utils/translation/poparser_unittest.cc1
-rw-r--r--src/utils/xml_unittest.cc7
7 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc
index 1be712783..f151e1524 100644
--- a/src/gui/widgets/browserbox_unittest.cc
+++ b/src/gui/widgets/browserbox_unittest.cc
@@ -84,6 +84,7 @@ TEST_CASE("BrowserBox tests", "browserbox")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
ActorSprite::load();
gui = new Gui();
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 8f280036a..2c17de6b6 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -186,6 +186,7 @@ TEST_CASE("Windows tests", "windowmanager")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
ConfigManager::initServerConfig("nonexistserver");
localPlayer = new LocalPlayer(static_cast<BeingId>(1),
@@ -846,6 +847,7 @@ TEST_CASE("WindowManager", "create windows")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
ConfigManager::initServerConfig("nonexistserver");
localPlayer = new LocalPlayer(static_cast<BeingId>(1),
diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc
index 0eee7b029..351a74a2d 100644
--- a/src/resources/dye/dyepalette_unittest.cc
+++ b/src/resources/dye/dyepalette_unittest.cc
@@ -93,6 +93,7 @@ TEST_CASE("DyePalette tests", "")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
ActorSprite::load();
gui = new Gui();
diff --git a/src/resources/sprite/animatedsprite_unittest.cc b/src/resources/sprite/animatedsprite_unittest.cc
index 23d2b8333..ee36ed7d7 100644
--- a/src/resources/sprite/animatedsprite_unittest.cc
+++ b/src/resources/sprite/animatedsprite_unittest.cc
@@ -94,6 +94,7 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
ActorSprite::load();
gui = new Gui();
diff --git a/src/utils/chatutils_unittest.cc b/src/utils/chatutils_unittest.cc
index cbe87da9d..d23e1331f 100644
--- a/src/utils/chatutils_unittest.cc
+++ b/src/utils/chatutils_unittest.cc
@@ -90,6 +90,7 @@ TEST_CASE("chatutils replaceVars", "")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
gui = new Gui();
gui->postInit(mainGraphics);
diff --git a/src/utils/translation/poparser_unittest.cc b/src/utils/translation/poparser_unittest.cc
index 54dccb85b..f986c0f37 100644
--- a/src/utils/translation/poparser_unittest.cc
+++ b/src/utils/translation/poparser_unittest.cc
@@ -84,6 +84,7 @@ TEST_CASE("PoParser tests", "PoParser")
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
ActorSprite::load();
gui = new Gui();
diff --git a/src/utils/xml_unittest.cc b/src/utils/xml_unittest.cc
index 1d4aa52cc..cd5346954 100644
--- a/src/utils/xml_unittest.cc
+++ b/src/utils/xml_unittest.cc
@@ -77,14 +77,15 @@ TEST_CASE("xml doc", "")
graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
#endif // USE_SDL2
- theme = new Theme;
- Theme::selectSkin();
-
Dirs::initRootDir();
Dirs::initHomeDir();
ConfigManager::initConfiguration();
getConfigDefaults2(config.getDefaultValues());
+ branding.setDefaultValues(getBrandingDefaults());
+
+ theme = new Theme;
+ Theme::selectSkin();
const char *const tempXmlName = "tempxml.xml";
ActorSprite::load();