Author: mordante
Date: Wed Aug 31 19:43:26 2011
New Revision: 50959

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50959&view=rev
Log:
Fix a broken unit test.

r50949 fixed a static initialization problem, but the code assumed the
same object was used. This commit fixes it, also tested by thonsew (
committer of r50949).

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=50959&r1=50958&r2=50959&view=diff
==============================================================================
--- trunk/src/tests/gui/test_gui2.cpp (original)
+++ trunk/src/tests/gui/test_gui2.cpp Wed Aug 31 19:43:26 2011
@@ -132,7 +132,7 @@
        typedef std::vector<std::pair<unsigned, unsigned> > tresolution_list;
 
 CVideo & video() {
-       CVideo * v_ = new CVideo(CVideo::FAKE_TEST);
+       static CVideo * v_ = new CVideo(CVideo::FAKE_TEST);
        return *v_;
 }
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to