Add unit test for wxDataViewCtrl::IsExpanded()
Check that it returns correct results, both for the currently visible and hidden items.
This commit is contained in:
@@ -84,7 +84,7 @@ DataViewCtrlTestCase::DataViewCtrlTestCase(long style)
|
||||
m_child2 = m_dvc->AppendItem(m_root, "child2");
|
||||
|
||||
m_dvc->SetSize(400, 200);
|
||||
m_dvc->ExpandAncestors(m_root);
|
||||
m_dvc->Expand(m_root);
|
||||
m_dvc->Refresh();
|
||||
m_dvc->Update();
|
||||
}
|
||||
@@ -188,4 +188,14 @@ TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
|
||||
TestSelectionFor0and1();
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
|
||||
"wxDVC::IsExpanded",
|
||||
"[wxDataViewCtrl][expand]")
|
||||
{
|
||||
CHECK( m_dvc->IsExpanded(m_root) );
|
||||
CHECK( !m_dvc->IsExpanded(m_child1) );
|
||||
CHECK( !m_dvc->IsExpanded(m_grandchild) );
|
||||
CHECK( !m_dvc->IsExpanded(m_child2) );
|
||||
}
|
||||
|
||||
#endif //wxUSE_DATAVIEWCTRL
|
||||
|
Reference in New Issue
Block a user