From: Vadim Zeitlin Date: Thu, 22 Oct 2009 23:54:55 +0000 (+0000) Subject: Give more informative error in wxFSW test. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1c9c8e88c2e67c77a66adc9dad6fc1a369f65205 Give more informative error in wxFSW test. Output more details when more than one event is unexpectedly received. Hopefully this will allow to debug the test failure at build bot slaves which doesn't seem to be happening locally. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/tests/fswatcher/fswatchertest.cpp b/tests/fswatcher/fswatchertest.cpp index 80fea6d5e8..306049f73e 100644 --- a/tests/fswatcher/fswatchertest.cpp +++ b/tests/fswatcher/fswatchertest.cpp @@ -327,7 +327,18 @@ public: virtual bool CheckResult() { - CPPUNIT_ASSERT_EQUAL( 1, m_events.size() ); + CPPUNIT_ASSERT_MESSAGE( "No events received", !m_events.empty() ); + + WX_ASSERT_EQUAL_MESSAGE + ( + ( + "Extra event received, last has type=%x, path=\"%s\"", + m_events.back()->GetChangeType(), + m_events.back()->GetPath().GetFullPath() + ), + 1, m_events.size() + ); + const wxFileSystemWatcherEvent * const e = m_events.front(); // this is our "reference event" @@ -342,7 +353,6 @@ public: CPPUNIT_ASSERT_EQUAL(expected.GetPath(), e->GetPath()); CPPUNIT_ASSERT_EQUAL(expected.GetNewPath(), e->GetNewPath()); - CPPUNIT_ASSERT_EQUAL(expected.GetChangeType(), e->GetChangeType()); return true; }