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:
parent
910dfbc010
commit
1ddf2ee303
1 changed files with 2 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue