From: Vadim Zeitlin Date: Fri, 16 Dec 2011 21:11:19 +0000 (+0000) Subject: Try to get more information about wxFileSystemWatcher unit test failures. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/69b554dcccf7582d8e3e93a88c33f6b506ed8ecb Try to get more information about wxFileSystemWatcher unit test failures. Log the original and new paths of the rename event to help debugging the extra modification events detected during the buildbot builds. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/tests/fswatcher/fswatchertest.cpp b/tests/fswatcher/fswatchertest.cpp index fc158e7162..afab336aff 100644 --- a/tests/fswatcher/fswatchertest.cpp +++ b/tests/fswatcher/fswatchertest.cpp @@ -335,19 +335,6 @@ public: const wxFileSystemWatcherEvent * const e = m_events.front(); - WX_ASSERT_EQUAL_MESSAGE - ( - ( - "Extra events received, first is of type %x, for path=\"%s\"," - "last is of type %x, path=\"%s\"", - e->GetChangeType(), - e->GetPath().GetFullPath(), - m_events.back()->GetChangeType(), - m_events.back()->GetPath().GetFullPath() - ), - 1, m_events.size() - ); - // this is our "reference event" const wxFileSystemWatcherEvent expected = ExpectedEvent(); @@ -360,6 +347,20 @@ public: CPPUNIT_ASSERT_EQUAL(expected.GetPath(), e->GetPath()); CPPUNIT_ASSERT_EQUAL(expected.GetNewPath(), e->GetNewPath()); + + WX_ASSERT_EQUAL_MESSAGE + ( + ( + "Extra events received, last one is of type %x, path=\"%s\" " + "(the original event was for \"%s\" (\"%s\")", + m_events.back()->GetChangeType(), + m_events.back()->GetPath().GetFullPath(), + e->GetPath().GetFullPath(), + e->GetNewPath().GetFullPath() + ), + 1, m_events.size() + ); + } virtual void GenerateEvent() = 0;