diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-28 23:49:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-28 23:49:10 +0300 |
commit | 906d9f21df128b46b91005e7ce3383cb511ff7aa (patch) | |
tree | ea05177a213b867dedd182f54a274f0454fd10f2 /src/unittests/integrity_unittest.cc | |
parent | 896b43b80b7f1db2d5add42e6349a4edd4fd8847 (diff) | |
download | manaverse-906d9f21df128b46b91005e7ce3383cb511ff7aa.tar.gz manaverse-906d9f21df128b46b91005e7ce3383cb511ff7aa.tar.bz2 manaverse-906d9f21df128b46b91005e7ce3383cb511ff7aa.tar.xz manaverse-906d9f21df128b46b91005e7ce3383cb511ff7aa.zip |
Add unit tests for SDL_ConvertSurface.
Diffstat (limited to 'src/unittests/integrity_unittest.cc')
-rw-r--r-- | src/unittests/integrity_unittest.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/unittests/integrity_unittest.cc b/src/unittests/integrity_unittest.cc index b2c234109..37abf43ae 100644 --- a/src/unittests/integrity_unittest.cc +++ b/src/unittests/integrity_unittest.cc @@ -20,7 +20,9 @@ #include "unittests/unittests.h" +#include "configuration.h" #include "client.h" +#include "dirs.h" #include "logger.h" #include "graphicsmanager.h" @@ -32,6 +34,8 @@ #include "fs/virtfs/rwops.h" #include "gui/gui.h" +#include "gui/userpalette.h" +#include "gui/theme.h" #include "input/inputactionmap.h" @@ -142,6 +146,14 @@ TEST_CASE("integrity tests", "integrity") graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 + userPalette = new UserPalette; + config.setValue("fontSize", 16); + theme = new Theme; + Theme::selectSkin(); + + Dirs::initRootDir(); + Dirs::initHomeDir(); + ActorSprite::load(); const char *const name1 = "dir/hide.png"; const int size1 = 368; @@ -347,11 +359,12 @@ TEST_CASE("integrity tests", "integrity") ResourceManager::cleanOrphans(true); - delete client; - client = nullptr; + delete2(userPalette); + delete2(client); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); + delete2(logger); // VirtFs::deinit(); } |