Refactor code waiting for events in the test suite
We already had WX_ASSERT_EVENT_OCCURS_IN macro and a recent commit also added code doing almost the same thing manually in wxTopLevelWindow unit test, which was one version too many. Replace both of them with the new EventCounter::WaitEvent(). No real changes, this is just a refactoring.
This commit is contained in:
@@ -152,7 +152,7 @@ void WindowTestCase::FocusEvent()
|
||||
|
||||
m_window->SetFocus();
|
||||
|
||||
WX_ASSERT_EVENT_OCCURS_IN(setfocus, 1, 500);
|
||||
CPPUNIT_ASSERT(setfocus.WaitEvent(500));
|
||||
CPPUNIT_ASSERT(m_window->HasFocus());
|
||||
|
||||
wxButton* button = new wxButton(wxTheApp->GetTopWindow(), wxID_ANY);
|
||||
|
Reference in New Issue
Block a user