From 69b554dcccf7582d8e3e93a88c33f6b506ed8ecb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Dec 2011 21:11:19 +0000 Subject: [PATCH] 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 --- tests/fswatcher/fswatchertest.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) 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; -- 2.50.0