X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3778b4d9c7eebc39f496a9dd055638e06fb9140..9e1da4827a0ec18f9766d664b9af12c25e3f71fb:/tests/controls/spinctrldbltest.cpp?ds=sidebyside diff --git a/tests/controls/spinctrldbltest.cpp b/tests/controls/spinctrldbltest.cpp index aa8e1ad8d5..854b4cefe7 100644 --- a/tests/controls/spinctrldbltest.cpp +++ b/tests/controls/spinctrldbltest.cpp @@ -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 }