[Libreoffice-commits] core.git: sw/qa
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 6 09:37:54 UTC 2020
sw/qa/extras/layout/layout.cxx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 8e655ab1da7aa3325ceea3031cb9c0bc810444a4
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Dec 30 02:00:26 2019 +0300
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Mon Jan 6 10:37:21 2020 +0100
Fix some sw layout tests for 150% UI scaling
On Windows, with 150% UI scaling, the four values whose tolerance are
added are 2099, 2888, 7962, and 4815 respectively.
Change-Id: I99bef2f23cc3c117463361bb038d74fda7a2e046
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85974
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga991 at gmail.com>
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index dd906b83fbee..4e3beb9cc3fb 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2198,7 +2198,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf125300)
CPPUNIT_ASSERT(pXmlDoc);
// Keep line spacing before bottom cell border (it was 1892)
- assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[5]/polyline/point[@y='2092']", 2);
+ sal_Int32 y1
+ = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[5]/polyline/point[1]", "y")
+ .toInt32();
+ sal_Int32 y2
+ = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[5]/polyline/point[2]", "y")
+ .toInt32();
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2092, y1, 7);
+ CPPUNIT_ASSERT_EQUAL(y1, y2);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116830)
@@ -2308,7 +2315,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf115630)
"/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/push[3]/polyline[1]/point[2]",
"x")
.toInt32();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2886), nXRight - nXLeft);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2886, nXRight - nXLeft, 2);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf108021)
@@ -2445,7 +2452,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testHorizontal_multilevel)
sal_Int32 nYposition
= getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/textarray[7]", "y")
.toInt32();
- CPPUNIT_ASSERT(nYposition > 7943 && nYposition < 7947);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(7945, nYposition, 20);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124796)
@@ -2495,7 +2502,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf129054)
"/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/push[4]/polyline[1]/point[31]",
"y")
.toInt32();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(4810), nYTop - nYBottom);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(4810, nYTop - nYBottom, 5);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf129173)
More information about the Libreoffice-commits
mailing list