diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-19 21:37:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-20 17:10:56 +0100 |
commit | 9ff4fd5ccc0a6b54309bba87769c07389f1bf935 (patch) | |
tree | b640e75acfecd6b9c5735163efd28c3a26320106 /test | |
parent | 103ad4fc70848443ba95fcb352569b35ccc38070 (diff) |
this duplicated CPPUNIT_ASSERT_POINT_EQUAL_WITH_TOLERANCE
so use that instead
Change-Id: I0a627fdd2f2657a3f23d47f014ff7019cab544f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162330
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/Library_test.mk | 1 | ||||
-rw-r--r-- | test/source/cppunitasserthelper.cxx | 60 |
2 files changed, 0 insertions, 61 deletions
diff --git a/test/Library_test.mk b/test/Library_test.mk index c51bd826e658..268a68744eaf 100644 --- a/test/Library_test.mk +++ b/test/Library_test.mk @@ -56,7 +56,6 @@ $(eval $(call gb_Library_add_exception_objects,test,\ test/source/helper/form \ test/source/helper/shape \ test/source/helper/transferable \ - test/source/cppunitasserthelper \ )) # vim: set noet sw=4 ts=4: diff --git a/test/source/cppunitasserthelper.cxx b/test/source/cppunitasserthelper.cxx deleted file mode 100644 index b3119b5b26d8..000000000000 --- a/test/source/cppunitasserthelper.cxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * 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/. - */ - -#include <test/cppunitasserthelper.hxx> - -CPPUNIT_NS_BEGIN - -void AssertRectEqualWithTolerance(std::string_view sInfo, const tools::Rectangle& rExpected, - const tools::Rectangle& rActual, const sal_Int32 nTolerance) -{ - // Left - OString sMsg = OString::Concat(sInfo) + " Left expected " + OString::number(rExpected.Left()) - + " actual " + OString::number(rActual.Left()) + " Tolerance " - + OString::number(nTolerance); - CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), - std::abs(rExpected.Left() - rActual.Left()) <= nTolerance); - - // Top - sMsg = OString::Concat(sInfo) + " Top expected " + OString::number(rExpected.Top()) + " actual " - + OString::number(rActual.Top()) + " Tolerance " + OString::number(nTolerance); - CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Top() - rActual.Top()) <= nTolerance); - - // Width - sMsg = OString::Concat(sInfo) + " Width expected " + OString::number(rExpected.GetWidth()) - + " actual " + OString::number(rActual.GetWidth()) + " Tolerance " - + OString::number(nTolerance); - CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), - std::abs(rExpected.GetWidth() - rActual.GetWidth()) <= nTolerance); - - // Height - sMsg = OString::Concat(sInfo) + " Height expected " + OString::number(rExpected.GetHeight()) - + " actual " + OString::number(rActual.GetHeight()) + " Tolerance " - + OString::number(nTolerance); - CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), - std::abs(rExpected.GetHeight() - rActual.GetHeight()) <= nTolerance); -} - -void AssertPointEqualWithTolerance(std::string_view sInfo, const Point rExpected, - const Point rActual, const sal_Int32 nTolerance) -{ - // X - OString sMsg = OString::Concat(sInfo) + " X expected " + OString::number(rExpected.X()) - + " actual " + OString::number(rActual.X()) + " Tolerance " - + OString::number(nTolerance); - CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.X() - rActual.X()) <= nTolerance); - // Y - sMsg = OString::Concat(sInfo) + " Y expected " + OString::number(rExpected.Y()) + " actual " - + OString::number(rActual.Y()) + " Tolerance " + OString::number(nTolerance); - CPPUNIT_ASSERT_MESSAGE(sMsg.getStr(), std::abs(rExpected.Y() - rActual.Y()) <= nTolerance); -} - -CPPUNIT_NS_END - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |