X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/232fdc630c42eb165f7659981043e794be03b3b7..f321d0bc0caf4d78ccc5426e926fc25c46297439:/tests/controls/radiobuttontest.cpp diff --git a/tests/controls/radiobuttontest.cpp b/tests/controls/radiobuttontest.cpp index 603052f53d..92ff3a3079 100644 --- a/tests/controls/radiobuttontest.cpp +++ b/tests/controls/radiobuttontest.cpp @@ -50,7 +50,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( RadioButtonTestCase ); -// 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( RadioButtonTestCase, "RadioButtonTestCase" ); @@ -71,10 +71,7 @@ void RadioButtonTestCase::Click() { // GTK does not support selecting a single radio button #if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__) - wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), - wxTestableFrame); - - EventCounter count(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED); + EventCounter selected(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED); wxUIActionSimulator sim; @@ -83,17 +80,14 @@ void RadioButtonTestCase::Click() wxYield(); - CPPUNIT_ASSERT_EQUAL( 1, frame->GetEventCount() ); + CPPUNIT_ASSERT_EQUAL( 1, selected.GetCount() ); #endif } void RadioButtonTestCase::Value() { #ifndef __WXGTK__ - wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(), - wxTestableFrame); - - EventCounter count(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED); + EventCounter selected(m_radio, wxEVT_COMMAND_RADIOBUTTON_SELECTED); m_radio->SetValue(true); @@ -103,7 +97,7 @@ void RadioButtonTestCase::Value() CPPUNIT_ASSERT(!m_radio->GetValue()); - CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount()); + CPPUNIT_ASSERT_EQUAL(0, selected.GetCount()); #endif }