]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/controls/checklistboxtest.cpp
using Destroy, as otherwise the remnants get into the way for some other tests
[wxWidgets.git] / tests / controls / checklistboxtest.cpp
index 16f3664d26a2ba5187e0059d29cd673201b2b626..eb3c9bf52fc58a60453110ebb6b50e720bf839c5 100644 (file)
@@ -65,8 +65,9 @@ void CheckListBoxTestCase::tearDown()
 
 void CheckListBoxTestCase::Check()
 {
-    EventCounter toggled(m_check, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED);
+    EventCounter toggled(m_check, wxEVT_CHECKLISTBOX);
 
+    wxArrayInt checkedItems;
     wxArrayString testitems;
     testitems.Add("item 0");
     testitems.Add("item 1");
@@ -84,6 +85,9 @@ void CheckListBoxTestCase::Check()
     CPPUNIT_ASSERT_EQUAL(true, m_check->IsChecked(0));
     CPPUNIT_ASSERT_EQUAL(false, m_check->IsChecked(1));
 
+    CPPUNIT_ASSERT_EQUAL(1, m_check->GetCheckedItems(checkedItems));
+    CPPUNIT_ASSERT_EQUAL(0, checkedItems[0]);
+
     //Make sure a double check of an items doesn't deselect it
     m_check->Check(0);