From 1cef35cad32a422dd3cb414cbf67dfdf9abbca60 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Sep 2010 14:30:13 +0000 Subject: [PATCH] Insert another item in the list control in its unit test. 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 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/controls/listbasetest.cpp b/tests/controls/listbasetest.cpp index 8876612b49..110ad0cf49 100644 --- a/tests/controls/listbasetest.cpp +++ b/tests/controls/listbasetest.cpp @@ -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;