From 77241feb3f132b90af41681b236def04139e8ea7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 23 Oct 2009 11:44:57 +0000 Subject: [PATCH] Use an even more informative error message in wxFSW unit test. Dump information about both events when we received two of them instead of the (single) expected one. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/fswatcher/fswatchertest.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/fswatcher/fswatchertest.cpp b/tests/fswatcher/fswatchertest.cpp index 306049f73e..e8a61c67da 100644 --- a/tests/fswatcher/fswatchertest.cpp +++ b/tests/fswatcher/fswatchertest.cpp @@ -329,18 +329,21 @@ public: { CPPUNIT_ASSERT_MESSAGE( "No events received", !m_events.empty() ); + const wxFileSystemWatcherEvent * const e = m_events.front(); + WX_ASSERT_EQUAL_MESSAGE ( ( - "Extra event received, last has type=%x, path=\"%s\"", + "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() ); - const wxFileSystemWatcherEvent * const e = m_events.front(); - // this is our "reference event" const wxFileSystemWatcherEvent expected = ExpectedEvent(); -- 2.47.2