Make sure the window is active after SetFocus() under wxQt
Calling wxYield() after SetFocus() ensures that the window is active and the tests will pass. Otherwise, they would fail.
This commit is contained in:
parent
3a71aeed5e
commit
b5dad92007
5 changed files with 16 additions and 3 deletions
|
|
@ -281,6 +281,7 @@ TEST_CASE_METHOD(NumValidatorTestCase, "ValNum::Interactive", "[valnum]")
|
|||
|
||||
// Entering '-' in a control with positive range is not allowed.
|
||||
m_text->SetFocus();
|
||||
wxYield();
|
||||
sim.Char('-');
|
||||
wxYield();
|
||||
CHECK( m_text->GetValue() == "" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue