[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/qa
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 6 14:47:09 UTC 2021
vcl/qa/cppunit/complextext.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit fe98f0831ed86bd4a4a179d59fbf0dc094727110
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Apr 1 15:27:46 2021 +0300
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Apr 6 16:46:34 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.kaganski at collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113659
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
More information about the Libreoffice-commits
mailing list