]> git.saurik.com Git - wxWidgets.git/blame - tests/testdate.h
Fixed capitalisation
[wxWidgets.git] / tests / testdate.h
CommitLineData
a5f22686
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: tests/testdate.h
3// Purpose: Unit test helpers for dealing with wxDateTime.
4// Author: Vadim Zeitlin
a5f22686
VZ
5// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
6// Licence: wxWindows licence
7///////////////////////////////////////////////////////////////////////////////
8
9#ifndef _WX_TESTS_TESTDATE_H_
10#define _WX_TESTS_TESTDATE_H_
11
12#include "wx/datetime.h"
13
14// need this to be able to use CPPUNIT_ASSERT_EQUAL with wxDateTime objects
15inline std::ostream& operator<<(std::ostream& ostr, const wxDateTime& dt)
16{
17 ostr << dt.FormatISOCombined(' ');
18
19 return ostr;
20}
21
77dd7daa
VZ
22// need this to be able to use CPPUNIT_ASSERT_EQUAL with wxDateSpan objects
23inline std::ostream& operator<<(std::ostream& ostr, const wxDateSpan& span)
24{
25 ostr << span.GetYears() << "Y, "
26 << span.GetMonths() << "M, "
27 << span.GetWeeks() << "W, "
28 << span.GetDays() << "D";
29
30 return ostr;
31}
32
a5f22686
VZ
33WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxDateTime::wxDateTime_t)
34
35#endif // _WX_TESTS_TESTDATE_H_