]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/controls/checklistboxtest.cpp
using button impl
[wxWidgets.git] / tests / controls / checklistboxtest.cpp
index 9f2711ab306b231c894be9bf541a930c9fcd55cc..16f3664d26a2ba5187e0059d29cd673201b2b626 100644 (file)
@@ -65,10 +65,7 @@ void CheckListBoxTestCase::tearDown()
 
 void CheckListBoxTestCase::Check()
 {
 
 void CheckListBoxTestCase::Check()
 {
-   wxTestableFrame* frame = wxStaticCast(wxTheApp->GetTopWindow(),
-                                          wxTestableFrame);
-
-    EventCounter count(m_check, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED);
+    EventCounter toggled(m_check, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED);
 
     wxArrayString testitems;
     testitems.Add("item 0");
 
     wxArrayString testitems;
     testitems.Add("item 0");
@@ -83,7 +80,7 @@ void CheckListBoxTestCase::Check()
     m_check->Check(1, false);
 
     //We should not get any events when changing this from code
     m_check->Check(1, false);
 
     //We should not get any events when changing this from code
-    CPPUNIT_ASSERT_EQUAL(0, frame->GetEventCount());
+    CPPUNIT_ASSERT_EQUAL(0, toggled.GetCount());
     CPPUNIT_ASSERT_EQUAL(true, m_check->IsChecked(0));
     CPPUNIT_ASSERT_EQUAL(false, m_check->IsChecked(1));
 
     CPPUNIT_ASSERT_EQUAL(true, m_check->IsChecked(0));
     CPPUNIT_ASSERT_EQUAL(false, m_check->IsChecked(1));