X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f7e8b765aa02c765ad58f49cf9ab7726fb61a90..e5354813181461c154044d52a464b29fa1aefaf8:/tests/controls/itemcontainertest.cpp diff --git a/tests/controls/itemcontainertest.cpp b/tests/controls/itemcontainertest.cpp index ab54a49702..48944ad0a8 100644 --- a/tests/controls/itemcontainertest.cpp +++ b/tests/controls/itemcontainertest.cpp @@ -244,13 +244,16 @@ void ItemContainerTestCase::SetString() container->Append(testitems); + container->SetSelection(0); container->SetString(0, "new item 0"); -#ifndef __WXOSX__ - container->SetString(2, ""); -#endif - CPPUNIT_ASSERT_EQUAL("new item 0", container->GetString(0)); + + // Modifying the item shouldn't deselect it. + CPPUNIT_ASSERT_EQUAL(0, container->GetSelection()); + + // wxOSX doesn't support having empty items in some containers. #ifndef __WXOSX__ + container->SetString(2, ""); CPPUNIT_ASSERT_EQUAL("", container->GetString(2)); #endif }