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:
@@ -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
|
||||||
|
@@ -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
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user