Check that calling GetString() with invalid index asserts
This is the behaviour that would be normally expected and now really happens for all the controls, including wxChoice.
This commit is contained in:
@@ -71,6 +71,7 @@ void ItemContainerTestCase::Count()
|
||||
wxItemContainer * const container = GetContainer();
|
||||
|
||||
CPPUNIT_ASSERT(container->IsEmpty());
|
||||
WX_ASSERT_FAILS_WITH_ASSERT( container->GetString(0) );
|
||||
|
||||
wxArrayString testitems;
|
||||
testitems.Add("item 0");
|
||||
@@ -95,6 +96,7 @@ void ItemContainerTestCase::Count()
|
||||
container->Insert(testitems, 1);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(5, container->GetCount());
|
||||
WX_ASSERT_FAILS_WITH_ASSERT( container->GetString(10) );
|
||||
}
|
||||
|
||||
void ItemContainerTestCase::ItemSelection()
|
||||
|
Reference in New Issue
Block a user