Fix UI unit tests: they must use/be linked to "she" library.

This commit is contained in:
David Capello 2012-08-12 14:49:02 -03:00
parent ce84dfbef6
commit 25605d8c06
2 changed files with 3 additions and 10 deletions

View File

@ -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})

View File

@ -21,10 +21,10 @@
#include "config.h"
#include <allegro.h>
#include <gtest/gtest.h>
#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<she::System> system(she::CreateSystem());
ui::GuiSystem guiSystem;
UniquePtr<ui::Manager> manager(new ui::Manager());
#endif
@ -56,7 +50,6 @@ int main(int argc, char* argv[])
}
#endif
allegro_exit();
return exitcode;
}