Author: mordante
Date: Sun Mar 6 15:14:12 2011
New Revision: 48786
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48786&view=rev
Log:
Enable unit tests for tgamestate_inspector.
Modified:
trunk/src/tests/gui/test_gui2.cpp
Modified: trunk/src/tests/gui/test_gui2.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tests/gui/test_gui2.cpp?rev=48786&r1=48785&r2=48786&view=diff
==============================================================================
--- trunk/src/tests/gui/test_gui2.cpp (original)
+++ trunk/src/tests/gui/test_gui2.cpp Sun Mar 6 15:14:12 2011
@@ -224,7 +224,7 @@
test<gui2::tgame_save>();
test<gui2::tgame_save_message>();
test<gui2::tgame_save_oos>();
-// test<gui2::tgamestate_inspector>(); /** @todo ENABLE */
+ test<gui2::tgamestate_inspector>();
test<gui2::tlanguage_selection>();
test<gui2::tmessage>();
test<gui2::tsimple_item_selector>();
@@ -253,9 +253,6 @@
std::remove(list.begin(), list.end(), "debug_clock")
, list.end());
list.erase(
- std::remove(list.begin(), list.end(),
"gamestate_inspector")
- , list.end());
- list.erase(
std::remove(list.begin(), list.end(), "unit_attack")
, list.end());
list.erase(
@@ -381,18 +378,21 @@
};
-#if 0
template<>
struct twrapper<gui2::tgamestate_inspector>
{
static gui2::tgamestate_inspector* create()
{
- /** @todo Would be nice to add real data to the vconfig. */
- return new gui2::tgamestate_inspector(vconfig());
- }
-
-};
-#endif
+ /**
+ * @todo Would be nice to add real data to the vconfig.
+ * It would also involve adding real data to the resources.
+ */
+ static config cfg;
+ static vconfig vcfg(cfg);
+ return new gui2::tgamestate_inspector(vcfg);
+ }
+
+};
template<>
struct twrapper<gui2::tmessage>
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits