Extract operator<<(ostream, wxFileName) from filename test.

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
This commit is contained in:
Vadim Zeitlin
2009-10-22 11:34:43 +00:00
parent ce38e440a6
commit 40152925d5
2 changed files with 9 additions and 9 deletions

View File

@@ -28,15 +28,7 @@
#include "wx/msw/registry.h" #include "wx/msw/registry.h"
#endif // __WXMSW__ #endif // __WXMSW__
// ---------------------------------------------------------------------------- #include "testfile.h"
// 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();
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// test data // test data

View File

@@ -13,6 +13,14 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/filename.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 // TestFile: self deleting test file in temporary directory
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------