]>
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
7 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8 ///////////////////////////////////////////////////////////////////////////////
16 #include "asserthelper.h"
20 std::ostream
& operator<<(std::ostream
& os
, const ColourChannel
& cc
)
24 os
<< static_cast<int>(cc
.m_value
);
27 } // anonymous namespace
29 std::ostream
& operator<<(std::ostream
& os
, const wxColour
& c
)
31 os
<< std::hex
<< std::noshowbase
33 << ColourChannel(c
.Red()) << ", "
34 << ColourChannel(c
.Green()) << ", "
35 << ColourChannel(c
.Blue());
37 if ( const unsigned char a
= c
.Alpha() )
39 os
<< ", " << ColourChannel(a
);
47 std::ostream
& operator<<(std::ostream
& os
, const wxSize
& s
)
49 os
<< s
.x
<< "x" << s
.y
;
54 std::ostream
& operator<<(std::ostream
& os
, const wxFont
& f
)
56 os
<< f
.GetNativeFontInfoUserDesc();
61 std::ostream
& operator<<(std::ostream
& os
, const wxPoint
& p
)
63 os
<< "(" << p
.x
<< ", " << p
.y
<< ")";