Fix TreeCtrlTestCase assert failure under Windows.
A '-' keypress doesn't collapse a tree item with the native MSW tree
control. Instead, when not using the generic tree control, simulate a
keypress of WXK_LEFT to collapse the root item . This fixes the assert
checking if the root item is collapsed after the keypress.
Regression since 9d7a7ec556
(which
mistakenly may have had treectrltest.cpp as part of its commit).
This commit is contained in:
@@ -587,7 +587,12 @@ void TreeCtrlTestCase::KeyNavigation()
|
||||
|
||||
CPPUNIT_ASSERT(m_tree->IsExpanded(m_root));
|
||||
|
||||
#ifdef wxHAS_GENERIC_TREECTRL
|
||||
sim.Char('-');
|
||||
#else
|
||||
sim.Char(WXK_LEFT);
|
||||
#endif
|
||||
|
||||
wxYield();
|
||||
|
||||
CPPUNIT_ASSERT(!m_tree->IsExpanded(m_root));
|
||||
|
Reference in New Issue
Block a user