diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-04-01 15:27:46 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-04-01 15:32:55 +0200 |
commit | 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a (patch) | |
tree | 536afde3d5e64e83dee2858d520ccb456017ee33 | |
parent | f327cbd98f6de8a8139d22076e276ed9ca737bd6 (diff) |
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.kaganski@collabora.com>
-rw-r--r-- | vcl/qa/cppunit/complextext.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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 |