diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-01 03:22:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-01 03:22:59 +0300 |
commit | 950c3109bcd8a69d77d22c316cfc6ab34abf5f22 (patch) | |
tree | aa2cd2cf37f34a3b80b063d4db2785453e832785 /src/gui/windowmanager_unittest.cc | |
parent | 8c53c9e09c2a5b3f5e320b87f62d61bbd7d16043 (diff) | |
download | manaverse-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.tar.gz manaverse-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.tar.bz2 manaverse-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.tar.xz manaverse-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.zip |
Extend windows unit tests with drawing.
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r-- | src/gui/windowmanager_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc index 3793a76c6..ccd027f98 100644 --- a/src/gui/windowmanager_unittest.cc +++ b/src/gui/windowmanager_unittest.cc @@ -47,6 +47,8 @@ #include "gui/windows/setupwindow.h" #include "gui/windows/serverdialog.h" +#include "input/touch/touchmanager.h" + #include "render/sdlgraphics.h" #include "resources/sdlimagehelper.h" @@ -81,14 +83,9 @@ TEST_CASE("Windows tests", "windowmanager") ActorSprite::load(); gui = new Gui(); gui->postInit(mainGraphics); + touchManager.init(); -#ifdef USE_SDL2 - SDLImageHelper::setRenderer(graphicsManager.createRenderer( - graphicsManager.createWindow(640, 480, 0, - SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE)); -#else - graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE); -#endif + mainGraphics->setVideoMode(640, 480, 1, 8, false, false, false, false); SECTION("setupWindow") { @@ -175,6 +172,9 @@ TEST_CASE("Windows tests", "windowmanager") delete2(connectionDialog); } + gui->draw(); + mainGraphics->updateScreen(); + delete2(userPalette); delete2(client); windowContainer = nullptr; |