]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/controls/itemcontainertest.cpp
Fixed capitalisation
[wxWidgets.git] / tests / controls / itemcontainertest.cpp
index ab54a497021593b62f7ad751b68a60bb2a3495d4..aa9df2a8e75c7ef9c68329684660932ecf5ad544 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxItemContainer unit test
 // Author:      Steven Lamerton
 // Created:     2010-06-29
-// RCS-ID:      $Id$
 // Copyright:   (c) 2010 Steven Lamerton
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -244,13 +243,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
 }