]> git.saurik.com Git - wxWidgets.git/blame - tests/asserthelper.h
XRC: make wxSplitterWindow's sashpos and minpanesize dimensions.
[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
232fdc63
VZ
6// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7///////////////////////////////////////////////////////////////////////////////
8
9#ifndef _WX_TESTS_ASSERTHELPER_H_
10#define _WX_TESTS_ASSERTHELPER_H_
11
12#include <ostream>
c9fbfcd9
SC
13#include "wx/colour.h"
14#include "wx/gdicmn.h"
15#include "wx/font.h"
232fdc63
VZ
16
17namespace
18{
19 // by default colour components values are output incorrectly because they
20 // are unsigned chars, define a small helper struct which formats them in
21 // a more useful way
22 struct ColourChannel
23 {
24 ColourChannel(unsigned char value) : m_value(value) { }
25
26 unsigned char m_value;
27 };
28
29 std::ostream& operator<<(std::ostream& os, const ColourChannel& cc);
30
31} // anonymous namespace
32
33// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxColour objects
34std::ostream& operator<<(std::ostream& os, const wxColour& c);
35
36// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxSize objects
37std::ostream& operator<<(std::ostream& os, const wxSize& s);
38
39// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxFont objects
40std::ostream& operator<<(std::ostream& os, const wxFont& f);
41
42// this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxPoint objects
43std::ostream& operator<<(std::ostream& os, const wxPoint& p);
44
45#endif