]> git.saurik.com Git - wxWidgets.git/commitdiff
Insert another item in the list control in its unit test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Sep 2010 14:30:13 +0000 (14:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Sep 2010 14:30:13 +0000 (14:30 +0000)
For some reason the test fails with a single item in the control when running
on the buildbot slave, check if this is still the case if we add another item
to the control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/controls/listbasetest.cpp

index 8876612b49af8cf12dd7693c31e4dd3652a5448e..110ad0cf495992da70f822973f8a67ad80cbce4a 100644 (file)
@@ -181,11 +181,6 @@ void ListBaseTestCase::ItemClick()
 
     wxListCtrl* const list = GetList();
 
-    EventCounter count(list, wxEVT_COMMAND_LIST_ITEM_SELECTED);
-    EventCounter count1(list, wxEVT_COMMAND_LIST_ITEM_FOCUSED);
-    EventCounter count2(list, wxEVT_COMMAND_LIST_ITEM_ACTIVATED);
-    EventCounter count3(list, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK);
-
     list->InsertColumn(0, "Column 0", wxLIST_FORMAT_LEFT, 60);
     list->InsertColumn(1, "Column 1", wxLIST_FORMAT_LEFT, 50);
     list->InsertColumn(2, "Column 2", wxLIST_FORMAT_LEFT, 40);
@@ -194,6 +189,14 @@ void ListBaseTestCase::ItemClick()
     list->SetItem(0, 1, "first column");
     list->SetItem(0, 2, "second column");
 
+    list->InsertItem(1, "Item 1");
+    list->SetItemState(1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+
+    EventCounter count(list, wxEVT_COMMAND_LIST_ITEM_SELECTED);
+    EventCounter count1(list, wxEVT_COMMAND_LIST_ITEM_FOCUSED);
+    EventCounter count2(list, wxEVT_COMMAND_LIST_ITEM_ACTIVATED);
+    EventCounter count3(list, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK);
+
     wxUIActionSimulator sim;
 
     wxRect pos;