Include testdate.h before catch.hpp in unit tests
This ensures that dates are printed out correctly if comparing them fails. It might be better to avoid always including this header, but this is the simplest solution.
This commit is contained in:
@@ -24,8 +24,6 @@
|
|||||||
|
|
||||||
#include "wx/wxcrt.h" // for wxStrstr()
|
#include "wx/wxcrt.h" // for wxStrstr()
|
||||||
|
|
||||||
#include "testdate.h"
|
|
||||||
|
|
||||||
// to test Today() meaningfully we must be able to change the system date which
|
// to test Today() meaningfully we must be able to change the system date which
|
||||||
// is not usually the case, but if we're under Win32 we can try it -- define
|
// is not usually the case, but if we're under Win32 we can try it -- define
|
||||||
// the macro below to do it
|
// the macro below to do it
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include "wx/datetime.h"
|
#include "wx/datetime.h"
|
||||||
|
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
// need this to be able to use CPPUNIT_ASSERT_EQUAL with wxDateTime objects
|
// need this to be able to use CPPUNIT_ASSERT_EQUAL with wxDateTime objects
|
||||||
inline std::ostream& operator<<(std::ostream& ostr, const wxDateTime& dt)
|
inline std::ostream& operator<<(std::ostream& ostr, const wxDateTime& dt)
|
||||||
{
|
{
|
||||||
|
@@ -4,6 +4,10 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
#include "wx/stopwatch.h"
|
#include "wx/stopwatch.h"
|
||||||
#include "wx/evtloop.h"
|
#include "wx/evtloop.h"
|
||||||
|
|
||||||
|
// This needs to be included before catch.hpp to be taken into account.
|
||||||
|
#include "testdate.h"
|
||||||
|
|
||||||
#include "wx/catch_cppunit.h"
|
#include "wx/catch_cppunit.h"
|
||||||
|
|
||||||
// Custom test macro that is only defined when wxUIActionSimulator is available
|
// Custom test macro that is only defined when wxUIActionSimulator is available
|
||||||
|
Reference in New Issue
Block a user