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:
Vadim Zeitlin
2019-01-24 14:04:10 +01:00
parent f4ea128007
commit 5811d541da
6 changed files with 33 additions and 39 deletions

View File

@@ -72,7 +72,7 @@ private:
};
//Convenience macro
#define ENSURE_LOADED WX_ASSERT_EVENT_OCCURS_IN((*m_loaded), 1, 1000)
#define ENSURE_LOADED CHECK( m_loaded->WaitEvent() )
// register in the unnamed registry so that these tests are run by default
CPPUNIT_TEST_SUITE_REGISTRATION( WebTestCase );