From 7cd60fb9388973425dbe7f7cbb3847ee363113d3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Mar 2012 00:29:14 +0000 Subject: [PATCH] No changes, just cleanup TopLevelWindowTestCase unit test a little. Remove the unnecessary overrides of setUp() and tearDown(). Also get rid of trailing whitespace. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/toplevel/toplevel.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/tests/toplevel/toplevel.cpp b/tests/toplevel/toplevel.cpp index 0e5b42db0e..2c129ec479 100644 --- a/tests/toplevel/toplevel.cpp +++ b/tests/toplevel/toplevel.cpp @@ -35,9 +35,6 @@ class TopLevelWindowTestCase : public CppUnit::TestCase public: TopLevelWindowTestCase() { } - virtual void setUp(); - virtual void tearDown(); - private: CPPUNIT_TEST_SUITE( TopLevelWindowTestCase ); CPPUNIT_TEST( DialogShowTest ); @@ -57,18 +54,6 @@ private: // also include in its own registry so that these tests can be run alone CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( TopLevelWindowTestCase, "fixme" ); -// ---------------------------------------------------------------------------- -// test initialization -// ---------------------------------------------------------------------------- - -void TopLevelWindowTestCase::setUp() -{ -} - -void TopLevelWindowTestCase::tearDown() -{ -} - // ---------------------------------------------------------------------------- // tests themselves // ---------------------------------------------------------------------------- @@ -90,25 +75,25 @@ void TopLevelWindowTestCase::FrameShowTest() void TopLevelWindowTestCase::TopLevelWindowShowTest(wxTopLevelWindow* tlw) { CPPUNIT_ASSERT(!tlw->IsShown()); - + wxTextCtrl* textCtrl = new wxTextCtrl(tlw, -1, "test"); textCtrl->SetFocus(); - + // only run this test on platforms where ShowWithoutActivating is implemented. #if defined(__WXMSW__) || defined(__WXMAC__) tlw->ShowWithoutActivating(); CPPUNIT_ASSERT(tlw->IsShown()); CPPUNIT_ASSERT(!tlw->IsActive()); - + tlw->Hide(); CPPUNIT_ASSERT(!tlw->IsShown()); CPPUNIT_ASSERT(!tlw->IsActive()); #endif - + tlw->Show(true); CPPUNIT_ASSERT(tlw->IsActive()); CPPUNIT_ASSERT(tlw->IsShown()); - + tlw->Hide(); CPPUNIT_ASSERT(!tlw->IsShown()); CPPUNIT_ASSERT(tlw->IsActive());