]>
git.saurik.com Git - wxWidgets.git/blob - tests/asserthelper.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/asserthelper.h
3 // Purpose: Helper functions for cppunit
4 // Author: Steven Lamerton
7 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_TESTS_ASSERTHELPER_H_
11 #define _WX_TESTS_ASSERTHELPER_H_
14 #include <wx/colour.h>
15 #include <wx/gdicmn.h>
20 // by default colour components values are output incorrectly because they
21 // are unsigned chars, define a small helper struct which formats them in
25 ColourChannel(unsigned char value
) : m_value(value
) { }
27 unsigned char m_value
;
30 std::ostream
& operator<<(std::ostream
& os
, const ColourChannel
& cc
);
32 } // anonymous namespace
34 // this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxColour objects
35 std::ostream
& operator<<(std::ostream
& os
, const wxColour
& c
);
37 // this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxSize objects
38 std::ostream
& operator<<(std::ostream
& os
, const wxSize
& s
);
40 // this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxFont objects
41 std::ostream
& operator<<(std::ostream
& os
, const wxFont
& f
);
43 // this operator is needed to use CPPUNIT_ASSERT_EQUAL with wxPoint objects
44 std::ostream
& operator<<(std::ostream
& os
, const wxPoint
& p
);