]> git.saurik.com Git - wxWidgets.git/blame - tests/asserthelper.h
Support for undoable application of custom properties, and customisation of propertie...
[wxWidgets.git] / tests / asserthelper.h
CommitLineData
232fdc63
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: tests/asserthelper.h
3// Purpose: Helper functions for cppunit
4// Author: Steven Lamerton
5// Created: 2010-07-23
6// RCS-ID: $Id$
7// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_TESTS_ASSERTHELPER_H_
11#define _WX_TESTS_ASSERTHELPER_H_
12
13#include <ostream>
14#include <wx/colour.h>
15#include <wx/gdicmn.h>
16#include <wx/font.h>
17
18namespace
19{
20 // by default colour components values are output incorrectly because they
21 // are unsigned chars, define a small helper struct which formats them in
22 // a more useful way
23 struct ColourChannel
24 {
25 ColourChannel(unsigned char value) : m_value(value) { }
26
27 unsigned char m_value;
28 };
29
30 std::ostream& operator<<(std::ostream& os, const ColourChannel& cc);
31
32} // anonymous namespace
33
34// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxColour objects
35std::ostream& operator<<(std::ostream& os, const wxColour& c);
36
37// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxSize objects
38std::ostream& operator<<(std::ostream& os, const wxSize& s);
39
40// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxFont objects
41std::ostream& operator<<(std::ostream& os, const wxFont& f);
42
43// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxPoint objects
44std::ostream& operator<<(std::ostream& os, const wxPoint& p);
45
46#endif