X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/232fdc630c42eb165f7659981043e794be03b3b7..f40f8e17226c2080dec017e2043fe59e2d21e15b:/tests/controls/spinctrldbltest.cpp

diff --git a/tests/controls/spinctrldbltest.cpp b/tests/controls/spinctrldbltest.cpp
index 36ff97482e..854b4cefe7 100644
--- a/tests/controls/spinctrldbltest.cpp
+++ b/tests/controls/spinctrldbltest.cpp
@@ -54,7 +54,7 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION( SpinCtrlDoubleTestCase );
 
-// also include in it's own registry so that these tests can be run alone
+// also include in its own registry so that these tests can be run alone
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SpinCtrlDoubleTestCase, "SpinCtrlDoubleTestCase" );
 
 void SpinCtrlDoubleTestCase::setUp()
@@ -70,10 +70,7 @@ void SpinCtrlDoubleTestCase::tearDown()
 void SpinCtrlDoubleTestCase::Arrows()
 {
 #ifndef __WXGTK__
-    wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(),
-                                          wxTestableFrame);
-
-    EventCounter count(m_spin, wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED);
+    EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED);
 
     wxUIActionSimulator sim;
 
@@ -83,13 +80,14 @@ void SpinCtrlDoubleTestCase::Arrows()
     sim.Char(WXK_UP);
     wxYield();
 
-    CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount());
+    CPPUNIT_ASSERT_EQUAL(1, updated.GetCount());
     CPPUNIT_ASSERT_EQUAL(1.0, m_spin->GetValue());
+    updated.Clear();
 
     sim.Char(WXK_DOWN);
     wxYield();
 
-    CPPUNIT_ASSERT_EQUAL(1, frame->GetEventCount());
+    CPPUNIT_ASSERT_EQUAL(1, updated.GetCount());
     CPPUNIT_ASSERT_EQUAL(0.0, m_spin->GetValue());
 #endif
 }