]> git.saurik.com Git - wxWidgets.git/blame - tests/testdate.h
Ignore empty LC_XXX variables in locale detection code.
[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
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
16inline std::ostream& operator<<(std::ostream& ostr, const wxDateTime& dt)
17{
18 ostr << dt.FormatISOCombined(' ');
19
20 return ostr;
21}
22
77dd7daa
VZ
23// need this to be able to use CPPUNIT_ASSERT_EQUAL with wxDateSpan objects
24inline std::ostream& operator<<(std::ostream& ostr, const wxDateSpan& span)
25{
26 ostr << span.GetYears() << "Y, "
27 << span.GetMonths() << "M, "
28 << span.GetWeeks() << "W, "
29 << span.GetDays() << "D";
30
31 return ostr;
32}
33
a5f22686
VZ
34WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxDateTime::wxDateTime_t)
35
36#endif // _WX_TESTS_TESTDATE_H_