Add a unit test exercising the bug fix in the parent commit
This test used to fail, but passes now.
This commit is contained in:
parent
fd839c4bd6
commit
86f9778ea9
1 changed files with 14 additions and 0 deletions
|
|
@ -152,3 +152,17 @@ TEST_CASE_METHOD(SelStoreTest, "wxSelectionStore::ItemsAddDelete", "[selstore]")
|
|||
CHECK(m_store.IsSelected(0));
|
||||
CHECK(m_store.IsSelected(NUM_ITEMS/2));
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SelStoreTest, "wxSelectionStore::InsertInSelected", "[selstore]")
|
||||
{
|
||||
m_store.SelectRange(0, NUM_ITEMS - 1);
|
||||
CHECK( m_store.GetSelectedCount() == NUM_ITEMS );
|
||||
|
||||
// Newly inserted items shouldn't be selected, even if all the existing
|
||||
// ones are.
|
||||
m_store.OnItemsInserted(1, 3);
|
||||
CHECK( !m_store.IsSelected(1) );
|
||||
CHECK( !m_store.IsSelected(2) );
|
||||
CHECK( !m_store.IsSelected(3) );
|
||||
CHECK( m_store.GetSelectedCount() == NUM_ITEMS );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue