diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-31 01:34:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-31 01:34:38 +0300 |
commit | e826d4c63365dde4c988453846437dcb65370945 (patch) | |
tree | 1bd23d4694c06d97e7e8c885253c0100fe6142b9 /src/unittests | |
parent | 75ca03c95c90064e67fa9eaddb4c609196dd3a27 (diff) | |
download | mv-e826d4c63365dde4c988453846437dcb65370945.tar.gz mv-e826d4c63365dde4c988453846437dcb65370945.tar.bz2 mv-e826d4c63365dde4c988453846437dcb65370945.tar.xz mv-e826d4c63365dde4c988453846437dcb65370945.zip |
Improve setting default values for configuration objects.
Diffstat (limited to 'src/unittests')
-rw-r--r-- | src/unittests/gui/widgets/browserbox.cc | 4 | ||||
-rw-r--r-- | src/unittests/gui/windowmanager.cc | 12 | ||||
-rw-r--r-- | src/unittests/resources/dye/dyepalette.cc | 6 | ||||
-rw-r--r-- | src/unittests/resources/resourcemanager/resourcemanager.cc | 2 | ||||
-rw-r--r-- | src/unittests/resources/sprite/animatedsprite.cc | 4 | ||||
-rw-r--r-- | src/unittests/utils/chatutils.cc | 4 | ||||
-rw-r--r-- | src/unittests/utils/stringutils.cc | 2 | ||||
-rw-r--r-- | src/unittests/utils/translation/poparser.cc | 4 | ||||
-rw-r--r-- | src/unittests/utils/xml.cc | 4 |
9 files changed, 21 insertions, 21 deletions
diff --git a/src/unittests/gui/widgets/browserbox.cc b/src/unittests/gui/widgets/browserbox.cc index 128c7a52c..8f97a6984 100644 --- a/src/unittests/gui/widgets/browserbox.cc +++ b/src/unittests/gui/widgets/browserbox.cc @@ -83,8 +83,8 @@ TEST_CASE("BrowserBox tests", "browserbox") Dirs::initHomeDir(); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); ActorSprite::load(); gui = new Gui(); diff --git a/src/unittests/gui/windowmanager.cc b/src/unittests/gui/windowmanager.cc index 6a215d081..0bf21a97d 100644 --- a/src/unittests/gui/windowmanager.cc +++ b/src/unittests/gui/windowmanager.cc @@ -162,7 +162,7 @@ TEST_CASE("Windows tests", "windowmanager") VirtFs::mountDirSilent("../data", Append_false); VirtFs::mountDirSilent("data/test", Append_false); VirtFs::mountDirSilent("../data/test", Append_false); - paths.setDefaultValues(getPathsDefaults()); + setPathsDefaults(paths); branding.setValue("onlineServerFile", "test/serverlistplus.xml"); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper; @@ -188,8 +188,8 @@ TEST_CASE("Windows tests", "windowmanager") ::remove(cfgName.c_str()); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); ConfigManager::initServerConfig("nonexistserver"); localPlayer = new LocalPlayer(static_cast<BeingId>(1), @@ -845,7 +845,7 @@ TEST_CASE("WindowManager", "create windows") VirtFs::mountDirSilent("../data", Append_false); VirtFs::mountDirSilent("data/test", Append_false); VirtFs::mountDirSilent("../data/test", Append_false); - paths.setDefaultValues(getPathsDefaults()); + setPathsDefaults(paths); branding.setValue("onlineServerFile", "test/serverlistplus.xml"); mainGraphics = new SDLGraphics; imageHelper = new SDLImageHelper; @@ -870,8 +870,8 @@ TEST_CASE("WindowManager", "create windows") ::remove(cfgName.c_str()); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); ConfigManager::initServerConfig("nonexistserver"); localPlayer = new LocalPlayer(static_cast<BeingId>(1), diff --git a/src/unittests/resources/dye/dyepalette.cc b/src/unittests/resources/dye/dyepalette.cc index 0e99e9871..9a64be1f5 100644 --- a/src/unittests/resources/dye/dyepalette.cc +++ b/src/unittests/resources/dye/dyepalette.cc @@ -95,13 +95,13 @@ TEST_CASE("DyePalette tests", "") Dirs::initHomeDir(); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); ActorSprite::load(); gui = new Gui(); gui->postInit(mainGraphics); - paths.setDefaultValues(getPathsDefaults()); + setPathsDefaults(paths); PaletteDB::load(); SECTION("simple test 1") diff --git a/src/unittests/resources/resourcemanager/resourcemanager.cc b/src/unittests/resources/resourcemanager/resourcemanager.cc index cd67b10d8..3e3a188f2 100644 --- a/src/unittests/resources/resourcemanager/resourcemanager.cc +++ b/src/unittests/resources/resourcemanager/resourcemanager.cc @@ -130,7 +130,7 @@ TEST_CASE("resourcemanager", "resourcemanager") ActorSprite::load(); // ConfigManager::initConfiguration(); -// getConfigDefaults2(config.getDefaultValues()); +// setConfigDefaults2(config); while (ResourceManager::cleanOrphans(true)) continue; diff --git a/src/unittests/resources/sprite/animatedsprite.cc b/src/unittests/resources/sprite/animatedsprite.cc index 3e4a1826c..f05fd76dd 100644 --- a/src/unittests/resources/sprite/animatedsprite.cc +++ b/src/unittests/resources/sprite/animatedsprite.cc @@ -96,8 +96,8 @@ TEST_CASE("AnimatedSprite tests", "animatedsprite") Dirs::initHomeDir(); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); ActorSprite::load(); gui = new Gui(); diff --git a/src/unittests/utils/chatutils.cc b/src/unittests/utils/chatutils.cc index 681d91d3e..69e79db27 100644 --- a/src/unittests/utils/chatutils.cc +++ b/src/unittests/utils/chatutils.cc @@ -92,8 +92,8 @@ TEST_CASE("chatutils replaceVars", "") Dirs::initHomeDir(); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); gui = new Gui(); gui->postInit(mainGraphics); diff --git a/src/unittests/utils/stringutils.cc b/src/unittests/utils/stringutils.cc index ee0a00cb0..44bc4d13f 100644 --- a/src/unittests/utils/stringutils.cc +++ b/src/unittests/utils/stringutils.cc @@ -1498,7 +1498,7 @@ TEST_CASE("stringuntils replaceItemLinks", "") ItemDB::NamedItemInfos &namedInfos = ItemDB::getNamedItemInfosTest(); ItemDB::ItemInfos &infos = ItemDB::getItemInfosTest(); - paths.setDefaultValues(getPathsDefaults()); + setPathsDefaults(paths); ItemInfo *info = new ItemInfo; info->setId(123456); info->setName("test name 1"); diff --git a/src/unittests/utils/translation/poparser.cc b/src/unittests/utils/translation/poparser.cc index f724e66fb..a299617e9 100644 --- a/src/unittests/utils/translation/poparser.cc +++ b/src/unittests/utils/translation/poparser.cc @@ -83,8 +83,8 @@ TEST_CASE("PoParser tests", "PoParser") Dirs::initHomeDir(); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); ActorSprite::load(); gui = new Gui(); diff --git a/src/unittests/utils/xml.cc b/src/unittests/utils/xml.cc index f9f7990f8..f27b65597 100644 --- a/src/unittests/utils/xml.cc +++ b/src/unittests/utils/xml.cc @@ -81,8 +81,8 @@ TEST_CASE("xml doc", "") Dirs::initHomeDir(); ConfigManager::initConfiguration(); - getConfigDefaults2(config.getDefaultValues()); - branding.setDefaultValues(getBrandingDefaults()); + setConfigDefaults2(config); + setBrandingDefaults(branding); theme = new Theme; Theme::selectSkin(); |