232fdc630c
Add a lot of tests for many wx GUI classes. Add tests using the new wxUIActionSimulator class but disable them under OS X as too many of them currently fail there. Refactor the test suite to make organizing the existing tests and adding the new ones easier. Improve documentation using the information gathered while testing the classes. Also update the documentation of the testing system itself. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: tests/asserthelper.cpp
|
|
// Purpose: Helper functions for cppunit
|
|
// Author: Steven Lamerton
|
|
// Created: 2010-07-23
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "testprec.h"
|
|
|
|
#ifdef __BORLANDC__
|
|
#pragma hdrstop
|
|
#endif
|
|
|
|
#include "asserthelper.h"
|
|
|
|
namespace
|
|
{
|
|
std::ostream& operator<<(std::ostream& os, const ColourChannel& cc)
|
|
{
|
|
os.width(2);
|
|
os.fill('0');
|
|
os << static_cast<int>(cc.m_value);
|
|
return os;
|
|
}
|
|
} // anonymous namespace
|
|
|
|
std::ostream& operator<<(std::ostream& os, const wxColour& c)
|
|
{
|
|
os << std::hex << std::noshowbase
|
|
<< "("
|
|
<< ColourChannel(c.Red()) << ", "
|
|
<< ColourChannel(c.Green()) << ", "
|
|
<< ColourChannel(c.Blue());
|
|
|
|
if ( const unsigned char a = c.Alpha() )
|
|
{
|
|
os << ", " << ColourChannel(a);
|
|
}
|
|
|
|
os << ")";
|
|
|
|
return os;
|
|
}
|
|
|
|
std::ostream& operator<<(std::ostream& os, const wxSize& s)
|
|
{
|
|
os << s.x << "x" << s.y;
|
|
|
|
return os;
|
|
}
|
|
|
|
std::ostream& operator<<(std::ostream& os, const wxFont& f)
|
|
{
|
|
os << f.GetNativeFontInfoUserDesc();
|
|
|
|
return os;
|
|
}
|
|
|
|
std::ostream& operator<<(std::ostream& os, const wxPoint& p)
|
|
{
|
|
os << "(" << p.x << ", " << p.y << ")";
|
|
|
|
return os;
|
|
}
|