diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 01:16:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 01:16:45 +0300 |
commit | a5f01058610fbb5ce099d0a11acf2eaf6a4b3515 (patch) | |
tree | f372942f301e31bb831ac2c3a0c46ffd5cda5f39 /src/unittests/resources/sdlimagehelper.cc | |
parent | 04b6502017530882a754f5c8ae6adb592324d723 (diff) | |
download | mv-a5f01058610fbb5ce099d0a11acf2eaf6a4b3515.tar.gz mv-a5f01058610fbb5ce099d0a11acf2eaf6a4b3515.tar.bz2 mv-a5f01058610fbb5ce099d0a11acf2eaf6a4b3515.tar.xz mv-a5f01058610fbb5ce099d0a11acf2eaf6a4b3515.zip |
Add missing init code into some unit tests.
Diffstat (limited to 'src/unittests/resources/sdlimagehelper.cc')
-rw-r--r-- | src/unittests/resources/sdlimagehelper.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/unittests/resources/sdlimagehelper.cc b/src/unittests/resources/sdlimagehelper.cc index 2a3aec45b..fa897c01d 100644 --- a/src/unittests/resources/sdlimagehelper.cc +++ b/src/unittests/resources/sdlimagehelper.cc @@ -29,12 +29,16 @@ PRAGMA48(GCC diagnostic pop) #include "unittests/unittests.h" #include "client.h" +#include "dirs.h" #include "graphicsmanager.h" #include "being/actorsprite.h" #include "fs/virtfs/fs.h" +#include "gui/userpalette.h" +#include "gui/theme.h" + #include "utils/delete2.h" #include "utils/env.h" @@ -84,6 +88,13 @@ TEST_CASE("sdlimagehelper combineSurface", "") graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); #endif // USE_SDL2 + userPalette = new UserPalette; + theme = new Theme; + Theme::selectSkin(); + + Dirs::initRootDir(); + Dirs::initHomeDir(); + ActorSprite::load(); SECTION("empty copy1") @@ -531,6 +542,8 @@ TEST_CASE("sdlimagehelper combineSurface", "") MSDL_FreeSurface(surface2); } + delete2(userPalette); + delete2(theme); delete2(client); VirtFs::unmountDirSilent("data"); VirtFs::unmountDirSilent("../data"); |