]> git.saurik.com Git - wxWidgets.git/commitdiff
Extract operator<<(ostream, wxFileName) from filename test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 11:34:43 +0000 (11:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 Oct 2009 11:34:43 +0000 (11:34 +0000)
Putting this function in a header allows to reuse it in other tests, e.g. the
upcoming wxFileSystemWatcher one.

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

tests/filename/filenametest.cpp
tests/testfile.h

index 7e85380c1bf7cb3f352fcc791a13938e503a9ec3..eefd5ffd62f16f9e5fcf310aba1de87ae2bab2e9 100644 (file)
     #include "wx/msw/registry.h"
 #endif // __WXMSW__
 
-// ----------------------------------------------------------------------------
-// local functions
-// ----------------------------------------------------------------------------
-
-// define stream inserter for wxFileName to use it in CPPUNIT_ASSERT_EQUAL()
-inline std::ostream& operator<<(std::ostream& o, const wxFileName& fn)
-{
-    return o << fn.GetFullPath();
-}
+#include "testfile.h"
 
 // ----------------------------------------------------------------------------
 // test data
index d982ee9334457ff44d530549b35e799892fe65a9..6946c8a10fac9587ad42ce3ee6dfabf60de2fb4a 100644 (file)
 #include "wx/filefn.h"
 #include "wx/filename.h"
 
+#include <ostream>
+
+// define stream inserter for wxFileName to use it in CPPUNIT_ASSERT_EQUAL()
+inline std::ostream& operator<<(std::ostream& o, const wxFileName& fn)
+{
+    return o << fn.GetFullPath();
+}
+
 // ----------------------------------------------------------------------------
 // TestFile: self deleting test file in temporary directory
 // ----------------------------------------------------------------------------