]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix g++ compilation of wxFileSystemWatcher test after VC6 fix.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 23:54:47 +0000 (23:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 23:54:47 +0000 (23:54 +0000)
Enums can't be used to deduce template parameters so cast WAIT_DURATION to int
explicitly before passing it to wxString::Format().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/fswatcher/fswatchertest.cpp

index 53d1f6607fcadead871aa8d019c06c5a9a124f2d..80fea6d5e8601ca3d32bb416863a47b19ebcef2c 100644 (file)
@@ -305,15 +305,13 @@ public:
     virtual bool AfterWait()
     {
         // fail if still no events
-         if (!tested)
-         {
-             wxString s;
-             s.Printf("No events from watcher during %d seconds!",
-                                                             WAIT_DURATION);
-             CPPUNIT_FAIL((const char*)s);
-         }
-
-         return true;
+        WX_ASSERT_MESSAGE
+        (
+             ("No events during %d seconds!", static_cast<int>(WAIT_DURATION)),
+             tested
+        );
+
+        return true;
     }
 
     virtual void OnFileSystemEvent(wxFileSystemWatcherEvent& evt)