Rebaked test GUI projects with toplevel.cpp included.

Added toplevel.cpp to GUI test projects and removed the test suite from the unnamed registry so that by default its tests don't run (some regarding ShowWithoutActivating are failing). This way at least the source file has more of a chance to be in a compilable state (compilation was broken). toplevel.cpp has never been included in a project since its addition in r62508 ("[...] until the mainloop issues are resolved [...]").

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth 2011-05-01 14:58:58 +00:00
parent e3778b4d9c
commit 1b54c33f81
11 changed files with 184 additions and 146 deletions

View File

@ -216,6 +216,7 @@ TEST_GUI_OBJECTS = \
test_gui_socket.o \
test_gui_boxsizer.o \
test_gui_wrapsizer.o \
test_gui_toplevel.o \
test_gui_valnum.o \
test_gui_clientsize.o \
test_gui_setsize.o \
@ -880,6 +881,9 @@ test_gui_boxsizer.o: $(srcdir)/sizers/boxsizer.cpp $(TEST_GUI_ODEP)
test_gui_wrapsizer.o: $(srcdir)/sizers/wrapsizer.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/sizers/wrapsizer.cpp
test_gui_toplevel.o: $(srcdir)/toplevel/toplevel.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/toplevel/toplevel.cpp
test_gui_valnum.o: $(srcdir)/validators/valnum.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/validators/valnum.cpp

View File

@ -201,6 +201,7 @@ TEST_GUI_OBJECTS = \
$(OBJS)\test_gui_socket.obj \
$(OBJS)\test_gui_boxsizer.obj \
$(OBJS)\test_gui_wrapsizer.obj \
$(OBJS)\test_gui_toplevel.obj \
$(OBJS)\test_gui_valnum.obj \
$(OBJS)\test_gui_clientsize.obj \
$(OBJS)\test_gui_setsize.obj \
@ -928,6 +929,9 @@ $(OBJS)\test_gui_boxsizer.obj: .\sizers\boxsizer.cpp
$(OBJS)\test_gui_wrapsizer.obj: .\sizers\wrapsizer.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\sizers\wrapsizer.cpp
$(OBJS)\test_gui_toplevel.obj: .\toplevel\toplevel.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\toplevel\toplevel.cpp
$(OBJS)\test_gui_valnum.obj: .\validators\valnum.cpp
$(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\validators\valnum.cpp

View File

@ -194,6 +194,7 @@ TEST_GUI_OBJECTS = \
$(OBJS)\test_gui_socket.o \
$(OBJS)\test_gui_boxsizer.o \
$(OBJS)\test_gui_wrapsizer.o \
$(OBJS)\test_gui_toplevel.o \
$(OBJS)\test_gui_valnum.o \
$(OBJS)\test_gui_clientsize.o \
$(OBJS)\test_gui_setsize.o \
@ -909,6 +910,9 @@ $(OBJS)\test_gui_boxsizer.o: ./sizers/boxsizer.cpp
$(OBJS)\test_gui_wrapsizer.o: ./sizers/wrapsizer.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\test_gui_toplevel.o: ./toplevel/toplevel.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\test_gui_valnum.o: ./validators/valnum.cpp
$(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $<

View File

@ -196,6 +196,7 @@ TEST_GUI_OBJECTS = \
$(OBJS)\test_gui_socket.obj \
$(OBJS)\test_gui_boxsizer.obj \
$(OBJS)\test_gui_wrapsizer.obj \
$(OBJS)\test_gui_toplevel.obj \
$(OBJS)\test_gui_valnum.obj \
$(OBJS)\test_gui_clientsize.obj \
$(OBJS)\test_gui_setsize.obj \
@ -1054,6 +1055,9 @@ $(OBJS)\test_gui_boxsizer.obj: .\sizers\boxsizer.cpp
$(OBJS)\test_gui_wrapsizer.obj: .\sizers\wrapsizer.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\sizers\wrapsizer.cpp
$(OBJS)\test_gui_toplevel.obj: .\toplevel\toplevel.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\toplevel\toplevel.cpp
$(OBJS)\test_gui_valnum.obj: .\validators\valnum.cpp
$(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\validators\valnum.cpp

View File

@ -440,6 +440,7 @@ TEST_GUI_OBJECTS = &
$(OBJS)\test_gui_socket.obj &
$(OBJS)\test_gui_boxsizer.obj &
$(OBJS)\test_gui_wrapsizer.obj &
$(OBJS)\test_gui_toplevel.obj &
$(OBJS)\test_gui_valnum.obj &
$(OBJS)\test_gui_clientsize.obj &
$(OBJS)\test_gui_setsize.obj &
@ -968,6 +969,9 @@ $(OBJS)\test_gui_boxsizer.obj : .AUTODEPEND .\sizers\boxsizer.cpp
$(OBJS)\test_gui_wrapsizer.obj : .AUTODEPEND .\sizers\wrapsizer.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
$(OBJS)\test_gui_toplevel.obj : .AUTODEPEND .\toplevel\toplevel.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<
$(OBJS)\test_gui_valnum.obj : .AUTODEPEND .\validators\valnum.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $<

View File

@ -202,6 +202,7 @@
net/socket.cpp
sizers/boxsizer.cpp
sizers/wrapsizer.cpp
toplevel/toplevel.cpp
validators/valnum.cpp
window/clientsize.cpp
window/setsize.cpp

View File

@ -517,6 +517,10 @@ SOURCE=.\controls\toolbooktest.cpp
# End Source File
# Begin Source File
SOURCE=.\toplevel\toplevel.cpp
# End Source File
# Begin Source File
SOURCE=.\controls\treebooktest.cpp
# End Source File
# Begin Source File

View File

@ -820,6 +820,9 @@
<File
RelativePath=".\controls\toolbooktest.cpp">
</File>
<File
RelativePath=".\toplevel\toplevel.cpp">
</File>
<File
RelativePath=".\controls\treebooktest.cpp">
</File>

View File

@ -1167,6 +1167,10 @@
RelativePath=".\controls\toolbooktest.cpp"
>
</File>
<File
RelativePath=".\toplevel\toplevel.cpp"
>
</File>
<File
RelativePath=".\controls\treebooktest.cpp"
>

View File

@ -1139,6 +1139,10 @@
RelativePath=".\controls\toolbooktest.cpp"
>
</File>
<File
RelativePath=".\toplevel\toplevel.cpp"
>
</File>
<File
RelativePath=".\controls\treebooktest.cpp"
>

View File

@ -18,8 +18,10 @@
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/window.h"
#include "wx/dialog.h"
#include "wx/frame.h"
#include "wx/textctrl.h"
#include "wx/toplevel.h"
#endif // WX_PRECOMP
#include "wx/evtloop.h"
@ -50,10 +52,10 @@ private:
};
// register in the unnamed registry so that these tests are run by default
CPPUNIT_TEST_SUITE_REGISTRATION( TopLevelWindowTestCase );
//CPPUNIT_TEST_SUITE_REGISTRATION( TopLevelWindowTestCase );
// also include in its own registry so that these tests can be run alone
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TopLevelWindowTestCase, "TopLevelWindowTestCase" );
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TopLevelWindowTestCase, "fixme" );
// ----------------------------------------------------------------------------
// test initialization
@ -93,7 +95,7 @@ void TopLevelWindowTestCase::TopLevelWindowShowTest(wxTopLevelWindow* tlw)
textCtrl->SetFocus();
// only run this test on platforms where ShowWithoutActivating is implemented.
#ifdef __WXMSW__ || defined(__WXMAC__)
#if defined(__WXMSW__) || defined(__WXMAC__)
tlw->ShowWithoutActivating();
CPPUNIT_ASSERT(tlw->IsShown());
CPPUNIT_ASSERT(!tlw->IsActive());