10 #ifndef INCLUDED_TEST_CPPUNITASSERTHELPER_HXX
11 #define INCLUDED_TEST_CPPUNITASSERTHELPER_HXX
13 #include <rtl/ustring.hxx>
15 #include <com/sun/star/awt/Point.hpp>
16 #include <com/sun/star/awt/Size.hpp>
17 #include <com/sun/star/table/CellAddress.hpp>
18 #include <com/sun/star/table/CellRangeAddress.hpp>
20 #include <cppunit/TestAssert.h>
29 template <>
struct assertion_traits<
css::awt::Point>
31 static bool equal(
const css::awt::Point& x,
const css::awt::Point& y) {
return x == y; }
33 static std::string
toString(
const css::awt::Point& x)
36 ost <<
"Point: " << x.X <<
"." << x.Y <<
" (coordinate: X.Y)";
46 template <>
struct assertion_traits<
css::awt::Size>
48 static bool equal(
const css::awt::Size& x,
const css::awt::Size& y) {
return x == y; }
50 static std::string
toString(
const css::awt::Size& x)
53 ost <<
"Size: " << x.Width <<
" x " << x.Height <<
" (Width x Height)";
63 template <>
struct assertion_traits<
css::table::CellAddress>
65 static bool equal(
const css::table::CellAddress& x,
const css::table::CellAddress& y)
70 static std::string
toString(
const css::table::CellAddress& x)
73 ost <<
"Sheet: " << x.Sheet <<
" Column: " << x.Column <<
" Row: " << x.Row;
83 template <>
struct assertion_traits<
css::table::CellRangeAddress>
85 static bool equal(
const css::table::CellRangeAddress& x,
const css::table::CellRangeAddress& y)
90 static std::string
toString(
const css::table::CellRangeAddress& x)
93 ost <<
"Sheet: " << x.Sheet <<
" StartColumn: " << x.StartColumn
94 <<
" StartRow: " << x.StartRow <<
" EndColumn: " << x.EndColumn
95 <<
" EndRow: " << x.EndRow;
102 #endif // INCLUDED_TEST_CPPUNITASSERTHELPER_HXX
static std::string toString(const css::awt::Size &x)
static std::string toString(const css::awt::Point &x)
static bool equal(const css::awt::Point &x, const css::awt::Point &y)
static std::string toString(const css::table::CellRangeAddress &x)
static bool equal(const css::table::CellAddress &x, const css::table::CellAddress &y)
static std::string toString(const css::table::CellAddress &x)
static bool equal(const css::awt::Size &x, const css::awt::Size &y)
static bool equal(const css::table::CellRangeAddress &x, const css::table::CellRangeAddress &y)