/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef INCLUDED_TEST_CPPUNITASSERTHELPER_HXX #define INCLUDED_TEST_CPPUNITASSERTHELPER_HXX #include #include #include #include #include #include CPPUNIT_NS_BEGIN /** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star:awt::Point. * * This specialization from @c struct @c assertion_traits<> helps to compare * @see com::sun::star::awt::Point. */ template <> struct assertion_traits { static bool equal(const css::awt::Point& x, const css::awt::Point& y) { return x == y; } static std::string toString(const css::awt::Point& x) { OStringStream ost; ost << "Point: " << x.X << "." << x.Y << " (coordinate: X.Y)"; return ost.str(); } }; /** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star:awt::Size. * * This specialization from @c struct @c assertion_traits<> helps to compare * @see com::sun::star::awt::Size. */ template <> struct assertion_traits { static bool equal(const css::awt::Size& x, const css::awt::Size& y) { return x == y; } static std::string toString(const css::awt::Size& x) { OStringStream ost; ost << "Size: " << x.Width << " x " << x.Height << " (Width x Height)"; return ost.str(); } }; /** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star::table::CellAddress. * * This specialization from @c struct @c assertion_traits<> helps to compare * @see com::sun::star::table::CellAddress. */ template <> struct assertion_traits { static bool equal(const css::table::CellAddress& x, const css::table::CellAddress& y) { return x == y; } static std::string toString(const css::table::CellAddress& x) { OStringStream ost; ost << "Sheet: " << x.Sheet << " Column: " << x.Column << " Row: " << x.Row; return ost.str(); } }; /** @brief Trait used by CPPUNIT_ASSERT* macros to compare com::sun::star::table::CellRangeAddress. * * This specialization from @c struct @c assertion_traits<> helps to compare * @see com::sun::star::table::CellRangeAddress. */ template <> struct assertion_traits { static bool equal(const css::table::CellRangeAddress& x, const css::table::CellRangeAddress& y) { return x == y; } static std::string toString(const css::table::CellRangeAddress& x) { OStringStream ost; ost << "Sheet: " << x.Sheet << " StartColumn: " << x.StartColumn << " StartRow: " << x.StartRow << " EndColumn: " << x.EndColumn << " EndRow: " << x.EndRow; return ost.str(); } }; CPPUNIT_NS_END #endif // INCLUDED_TEST_CPPUNITASSERTHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 4.8 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2023-08-23tdf#146619 Remove unused includes from vcl/incGabor Kelemen
2023-08-02vcl: Drop unused FontAttributes::GetMapNames()/AddMapName()Khaled Hosny
2022-11-21remove FontAttributes::meCharSetCaolán McNamara
2022-09-21use more string_view in vclNoel Grandin
2019-06-13tdf#42949 Fix IWYU warnings in vcl/inc/*Gabor Kelemen
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen
2018-07-31Add missing sal/log.hxx headersGabor Kelemen
2018-07-27vcl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
2017-11-06KF5 add FontFace implementationJan-Marek Glogowski
2017-05-19remove unused languagetag.hxx includesJochen Nitschke
2016-11-29Drop a bunch of font metrics flagsKhaled Hosny
2016-06-27loplugin:singlevalfields in vcl(part2)Noel Grandin
2016-06-01loplugin:unusedmethodsNoel Grandin
2016-04-14loplugin:passstuffbyref in vclNoel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2016-01-29vcl: inline FontAttributes::AddMapNameChris Sherlock
2016-01-29vcl: changes to included vcl headersChris Sherlock
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock
2016-01-28vcl: add in copy constructor for FontAttributesChris Sherlock
2016-01-21vcl: tabify fontattributes.hxxChris Sherlock
2016-01-20vcl: add more property functions to FontChris Sherlock
2016-01-19vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()Chris Sherlock
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud
2016-01-16vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()Chris Sherlock
2016-01-15loplugin:simplifyboolNoel Grandin
2016-01-15vcl: add symbol and charset accessors and mutators to FontChris Sherlock
2016-01-15vcl: add the meCharSet attribute into FontAttributesChris Sherlock
2016-01-15vcl: create a default FontAttributes constructorChris Sherlock
2016-01-14vcl: cleanup - remove unnecessary includes and fwd declsChris Sherlock
2016-01-12vcl: resplit FontAttributes from ImplFontMetricDataChris Sherlock
2016-01-10vcl: promote ImplFontAttributes to FontAttributesChris Sherlock
2016-01-10vcl: add missing mutator operations to ImplFontAttributesChris Sherlock
2016-01-07vcl: tabify fontattributes.hxxChris Sherlock
2016-01-07vcl: cleanup headers - remove unnecessary includes and fwd declsChris Sherlock
2016-01-07vcl: split more font classes from outfont.hxxChris Sherlock
2016-01-07vcl: remove unnecessary includes in font headersChris Sherlock
2016-01-06vcl: init font metric variables in ImplFontAttributes constructorsChris Sherlock
2016-01-03vcl: split out ImplFontAttributes into own headerChris Sherlock