]>
git.saurik.com Git - wxWidgets.git/blob - tests/asserthelper.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/asserthelper.cpp
3 // Purpose: Helper functions for cppunit
4 // Author: Steven Lamerton
6 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7 ///////////////////////////////////////////////////////////////////////////////
15 #include "asserthelper.h"
19 std::ostream
& operator<<(std::ostream
& os
, const ColourChannel
& cc
)
23 os
<< static_cast<int>(cc
.m_value
);
26 } // anonymous namespace
28 std::ostream
& operator<<(std::ostream
& os
, const wxColour
& c
)
30 os
<< std::hex
<< std::noshowbase
32 << ColourChannel(c
.Red()) << ", "
33 << ColourChannel(c
.Green()) << ", "
34 << ColourChannel(c
.Blue());
36 if ( const unsigned char a
= c
.Alpha() )
38 os
<< ", " << ColourChannel(a
);
46 std::ostream
& operator<<(std::ostream
& os
, const wxSize
& s
)
48 os
<< s
.x
<< "x" << s
.y
;
53 std::ostream
& operator<<(std::ostream
& os
, const wxFont
& f
)
55 os
<< f
.GetNativeFontInfoUserDesc();
60 std::ostream
& operator<<(std::ostream
& os
, const wxPoint
& p
)
62 os
<< "(" << p
.x
<< ", " << p
.y
<< ")";