summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-01 03:22:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-01 03:22:59 +0300
commit950c3109bcd8a69d77d22c316cfc6ab34abf5f22 (patch)
treeaa2cd2cf37f34a3b80b063d4db2785453e832785 /src/gui/windowmanager_unittest.cc
parent8c53c9e09c2a5b3f5e320b87f62d61bbd7d16043 (diff)
downloadplus-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.tar.gz
plus-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.tar.bz2
plus-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.tar.xz
plus-950c3109bcd8a69d77d22c316cfc6ab34abf5f22.zip
Extend windows unit tests with drawing.
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r--src/gui/windowmanager_unittest.cc14
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;