]>
Commit | Line | Data |
---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | |
2 | // Name: tests/testdate.h | |
3 | // Purpose: Unit test helpers for dealing with wxDateTime. | |
4 | // Author: Vadim Zeitlin | |
5 | // RCS-ID: $Id$ | |
6 | // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> | |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_TESTS_TESTDATE_H_ | |
11 | #define _WX_TESTS_TESTDATE_H_ | |
12 | ||
13 | #include "wx/datetime.h" | |
14 | ||
15 | // need this to be able to use CPPUNIT_ASSERT_EQUAL with wxDateTime objects | |
16 | inline std::ostream& operator<<(std::ostream& ostr, const wxDateTime& dt) | |
17 | { | |
18 | ostr << dt.FormatISOCombined(' '); | |
19 | ||
20 | return ostr; | |
21 | } | |
22 | ||
23 | WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxDateTime::wxDateTime_t) | |
24 | ||
25 | #endif // _WX_TESTS_TESTDATE_H_ |