vcl/qa/cppunit/complextext.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 571c69d6a177d1954f489f97406d2d2985951877 Author: Mike Kaganski <[email protected]> AuthorDate: Thu Apr 1 15:27:46 2021 +0300 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Apr 1 15:34:52 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 <[email protected]> (cherry picked from commit 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113472 Tested-by: Mike Kaganski <[email protected]> diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 4d4c112638e4..f8d417e18350 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -91,9 +91,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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
