]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/toplevel/toplevel.cpp
applying editor part of patch, see #15003
[wxWidgets.git] / tests / toplevel / toplevel.cpp
index 9306a93f5e9580fa7a52f35dff755290b45d0973..2c129ec4797e9b22694212f71ad09f8de480e700 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     Tests for wxTopLevelWindow
 // Author:      Kevin Ollivier
 // Created:     2008-05-25
 // Purpose:     Tests for wxTopLevelWindow
 // Author:      Kevin Ollivier
 // Created:     2008-05-25
-// RCS-ID:      $Id: toplevel.cpp 53741 2008-05-25 03:08:31Z VZ $
+// RCS-ID:      $Id$
 // Copyright:   (c) 2009 Kevin Ollivier <kevino@theolliviers.com>
 ///////////////////////////////////////////////////////////////////////////////
 
 // Copyright:   (c) 2009 Kevin Ollivier <kevino@theolliviers.com>
 ///////////////////////////////////////////////////////////////////////////////
 
 #endif
 
 #ifndef WX_PRECOMP
 #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"
 #endif // WX_PRECOMP
 
 #include "wx/evtloop.h"
@@ -33,9 +35,6 @@ class TopLevelWindowTestCase : public CppUnit::TestCase
 public:
     TopLevelWindowTestCase() { }
 
 public:
     TopLevelWindowTestCase() { }
 
-    virtual void setUp();
-    virtual void tearDown();
-
 private:
     CPPUNIT_TEST_SUITE( TopLevelWindowTestCase );
         CPPUNIT_TEST( DialogShowTest );
 private:
     CPPUNIT_TEST_SUITE( TopLevelWindowTestCase );
         CPPUNIT_TEST( DialogShowTest );
@@ -50,22 +49,10 @@ private:
 };
 
 // register in the unnamed registry so that these tests are run by default
 };
 
 // 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 it's own registry so that these tests can be run alone
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TopLevelWindowTestCase, "TopLevelWindowTestCase" );
-
-// ----------------------------------------------------------------------------
-// test initialization
-// ----------------------------------------------------------------------------
-
-void TopLevelWindowTestCase::setUp()
-{
-}
-
-void TopLevelWindowTestCase::tearDown()
-{
-}
+// also include in its own registry so that these tests can be run alone
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TopLevelWindowTestCase, "fixme" );
 
 // ----------------------------------------------------------------------------
 // tests themselves
 
 // ----------------------------------------------------------------------------
 // tests themselves
@@ -88,25 +75,25 @@ void TopLevelWindowTestCase::FrameShowTest()
 void TopLevelWindowTestCase::TopLevelWindowShowTest(wxTopLevelWindow* tlw)
 {
     CPPUNIT_ASSERT(!tlw->IsShown());
 void TopLevelWindowTestCase::TopLevelWindowShowTest(wxTopLevelWindow* tlw)
 {
     CPPUNIT_ASSERT(!tlw->IsShown());
-    
+
     wxTextCtrl* textCtrl = new wxTextCtrl(tlw, -1, "test");
     textCtrl->SetFocus();
     wxTextCtrl* textCtrl = new wxTextCtrl(tlw, -1, "test");
     textCtrl->SetFocus();
-    
+
 // only run this test on platforms where ShowWithoutActivating is implemented.
 // 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());
     tlw->ShowWithoutActivating();
     CPPUNIT_ASSERT(tlw->IsShown());
     CPPUNIT_ASSERT(!tlw->IsActive());
-    
+
     tlw->Hide();
     CPPUNIT_ASSERT(!tlw->IsShown());
     CPPUNIT_ASSERT(!tlw->IsActive());
 #endif
     tlw->Hide();
     CPPUNIT_ASSERT(!tlw->IsShown());
     CPPUNIT_ASSERT(!tlw->IsActive());
 #endif
-    
+
     tlw->Show(true);
     CPPUNIT_ASSERT(tlw->IsActive());
     CPPUNIT_ASSERT(tlw->IsShown());
     tlw->Show(true);
     CPPUNIT_ASSERT(tlw->IsActive());
     CPPUNIT_ASSERT(tlw->IsShown());
-    
+
     tlw->Hide();
     CPPUNIT_ASSERT(!tlw->IsShown());
     CPPUNIT_ASSERT(tlw->IsActive());
     tlw->Hide();
     CPPUNIT_ASSERT(!tlw->IsShown());
     CPPUNIT_ASSERT(tlw->IsActive());