mail[Wesnoth-commits] r40105 - in /trunk: changelog src/tests/gui/test_gui2.cpp src/tests/main.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on December 05, 2009 - 23:47:
Author: mordante
Date: Sat Dec  5 23:47:27 2009
New Revision: 40105

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40105&view=rev
Log:
Fix the gui2 unit tests.

Modified:
    trunk/changelog
    trunk/src/tests/gui/test_gui2.cpp
    trunk/src/tests/main.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=40105&r1=40104&r2=40105&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Dec  5 23:47:27 2009
@@ -14,6 +14,7 @@
    * Optimize AI recruitement and movement phases
    * Add hotkey support for gui2
    * Remove spurious hover error messages
+   * Fix the gui2 unit tests
 
 Version 1.7.9-beta2:
  * AI:

Modified: trunk/src/tests/gui/test_gui2.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tests/gui/test_gui2.cpp?rev=40105&r1=40104&r2=40105&view=diff
==============================================================================
--- trunk/src/tests/gui/test_gui2.cpp (original)
+++ trunk/src/tests/gui/test_gui2.cpp Sat Dec  5 23:47:27 2009
@@ -43,7 +43,6 @@
 #include "gui/dialogs/title_screen.hpp"
 #include "gui/dialogs/transient_message.hpp"
 #include "gui/dialogs/wml_message.hpp"
-#include "gui/widgets/helper.hpp"
 #include "gui/widgets/settings.hpp"
 #include "language.hpp"
 #include "map_create.hpp"
@@ -197,8 +196,6 @@
                game_config::load_config(cfg ? &cfg : NULL);
        }
 
-       gui2::init();
-
        /**** Run the tests. *****/
        test<gui2::taddon_connect>();
        test<gui2::taddon_list>();

Modified: trunk/src/tests/main.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tests/main.cpp?rev=40105&r1=40104&r2=40105&view=diff
==============================================================================
--- trunk/src/tests/main.cpp (original)
+++ trunk/src/tests/main.cpp Sat Dec  5 23:47:27 2009
@@ -26,6 +26,8 @@
 #include "filesystem.hpp"
 #include "game_config.hpp"
 #include "game_errors.hpp"
+#include "gui/auxiliary/event/handler.hpp"
+#include "gui/widgets/helper.hpp"
 #include "network.hpp"
 #include "config.hpp"
 #include "log.hpp"
@@ -63,6 +65,10 @@
                SDL_Init(SDL_INIT_TIMER);
                test_utils::get_fake_display(1024, 768);
 
+               gui2::init();
+               static const gui2::event::tmanager gui_event_manager;
+
+
 
                // Set more report as default
                if (boost::unit_test::runtime_config::log_level() == 
boost::unit_test::invalid_log_level)




Related Messages


Powered by MHonArc, Updated Sun Dec 06 00:00:17 2009