]> git.saurik.com Git - wxWidgets.git/blob - tests/asserthelper.cpp
Remove the item before notifying about it in wxDataViewIndexListModel.
[wxWidgets.git] / tests / asserthelper.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/asserthelper.cpp
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 #include "testprec.h"
11
12 #ifdef __BORLANDC__
13 #pragma hdrstop
14 #endif
15
16 #include "asserthelper.h"
17
18 namespace
19 {
20 std::ostream& operator<<(std::ostream& os, const ColourChannel& cc)
21 {
22 os.width(2);
23 os.fill('0');
24 os << static_cast<int>(cc.m_value);
25 return os;
26 }
27 } // anonymous namespace
28
29 std::ostream& operator<<(std::ostream& os, const wxColour& c)
30 {
31 os << std::hex << std::noshowbase
32 << "("
33 << ColourChannel(c.Red()) << ", "
34 << ColourChannel(c.Green()) << ", "
35 << ColourChannel(c.Blue());
36
37 if ( const unsigned char a = c.Alpha() )
38 {
39 os << ", " << ColourChannel(a);
40 }
41
42 os << ")";
43
44 return os;
45 }
46
47 std::ostream& operator<<(std::ostream& os, const wxSize& s)
48 {
49 os << s.x << "x" << s.y;
50
51 return os;
52 }
53
54 std::ostream& operator<<(std::ostream& os, const wxFont& f)
55 {
56 os << f.GetNativeFontInfoUserDesc();
57
58 return os;
59 }
60
61 std::ostream& operator<<(std::ostream& os, const wxPoint& p)
62 {
63 os << "(" << p.x << ", " << p.y << ")";
64
65 return os;
66 }