diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e806f0056..c3c714cbb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -459,7 +459,7 @@ endfunction() find_unittests(base base-lib ${sys_libs}) find_unittests(gfx gfx-lib base-lib ${sys_libs}) -find_unittests(ui ui-lib gfx-lib base-lib ${libs3rdparty} ${sys_libs}) +find_unittests(ui ui-lib she gfx-lib base-lib ${libs3rdparty} ${sys_libs}) find_unittests(file ${all_libs}) find_unittests(app ${all_libs}) find_unittests(. ${all_libs}) diff --git a/src/tests/test.h b/src/tests/test.h index b5b7f1516..f63bc0459 100644 --- a/src/tests/test.h +++ b/src/tests/test.h @@ -21,10 +21,10 @@ #include "config.h" -#include #include #ifdef TEST_GUI + #include "she/she.h" #include "ui/gui.h" #endif @@ -35,17 +35,11 @@ int main(int argc, char* argv[]) { int exitcode; - ::testing::InitGoogleTest(&argc, argv); - allegro_init(); #ifdef TEST_GUI - set_color_depth(desktop_color_depth()); - set_gfx_mode(GFX_AUTODETECT_WINDOWED, 256, 256, 0, 0); - install_timer(); - install_keyboard(); - install_mouse(); { + she::ScopedHandle system(she::CreateSystem()); ui::GuiSystem guiSystem; UniquePtr manager(new ui::Manager()); #endif @@ -56,7 +50,6 @@ int main(int argc, char* argv[]) } #endif - allegro_exit(); return exitcode; }