]> git.saurik.com Git - wxWidgets.git/commitdiff
Use an even more informative error message in wxFSW unit test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Oct 2009 11:44:57 +0000 (11:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Oct 2009 11:44:57 +0000 (11:44 +0000)
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

index 306049f73e7954c64bc87ea4cc029f8b646ff9bc..e8a61c67da8a322d6822bc335cd603a6a630cc6b 100644 (file)
@@ -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();