vcl/qa/cppunit/complextext.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Apr 1 15:27:46 2021 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Apr 1 15:32:55 2021 +0200 Fix VclComplexTextTest::testArabic another way After 5c9ba1f47d00ed10960b59928befd68f6c020b15, Jenkins builds sometimes fail the opposite way: Test name: VclComplexTextTest::testArabic equality assertion failed - Expected: 70x14@(1,1) - Actual : 71x14@(0,1) So it seems that RDP session is not a reliable criterion. Just relax the check to allow epsilon of 1. Change-Id: I17ecacb61d6b0f15f7d5c9ec348e6e0b05e83c0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113453 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 5e830ba35439..fda8aea30245 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -86,9 +86,12 @@ void VclComplexTextTest::testArabic() CPPUNIT_ASSERT_EQUAL(tools::Long(14), pOutDev->GetTextHeight()); // exact bounding rectangle, not essentially the same as text width/height - tools::Rectangle aBoundRect, aTestRect(isWindowsRDP() ? 1 : 0, 1, 71, 15); + tools::Rectangle aBoundRect; pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree); - CPPUNIT_ASSERT_EQUAL(aTestRect, aBoundRect); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0, aBoundRect.getX(), 1); // This sometimes equals to 1 + CPPUNIT_ASSERT_DOUBLES_EQUAL(1, aBoundRect.getY(), 1); + CPPUNIT_ASSERT_DOUBLES_EQUAL(71, aBoundRect.getWidth(), 1); // This sometimes equals to 70 + CPPUNIT_ASSERT_DOUBLES_EQUAL(15, aBoundRect.getHeight(), 1); #if 0 // FIXME: This seems to be wishful thinking, GetTextRect() does not take _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits