]> git.saurik.com Git - wxWidgets.git/commitdiff
Try to get more information about wxFileSystemWatcher unit test failures.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Dec 2011 21:11:19 +0000 (21:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Dec 2011 21:11:19 +0000 (21:11 +0000)
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

index fc158e7162049bb04c280d830fa5a4a22b977fd5..afab336aff09e3a5dbad6eca5d9e41e3249fc843 100644 (file)
@@ -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;