[Libreoffice-commits] core.git: sw/qa
slacka (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 27 12:27:27 UTC 2019
sw/qa/extras/layout/layout.cxx | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
New commits:
commit 85b29e0be7bbade080c2978aef598839a89cfd3e
Author: slacka <lukebenes at hotmail.com>
AuthorDate: Thu Dec 26 21:14:36 2019 -0500
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 27 13:26:50 2019 +0100
Fix 32-bit gcc Unit Test Failures
This relaxes the tests to work around a precision error with gcc7-9.
No issue with 32-bit clang.
Change-Id: I0222bc91243e461408b4e611953355492975ff4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 5274bef2b8a0..8825d2e77513 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2379,11 +2379,16 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf126244)
assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[1]", "orientation",
"0");
// Test the second level of vertical category axis labels orientation. The second level orientation should be vertical.
- assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[5]", "orientation",
- "900");
+ sal_Int32 nRotation
+ = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[5]",
+ "orientation")
+ .toInt32();
+ CPPUNIT_ASSERT(nRotation >= 899 && nRotation <= 900);
// Test the third level of vertical category axis labels orientation. The third level orientation should be vertical.
- assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[7]", "orientation",
- "900");
+ nRotation = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/font[7]",
+ "orientation")
+ .toInt32();
+ CPPUNIT_ASSERT(nRotation >= 899 && nRotation <= 900);
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf127304)
@@ -2397,8 +2402,11 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf127304)
xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
CPPUNIT_ASSERT(pXmlDoc);
// Test the first level of horizontal category axis labels orientation. The first level orientation should be vertical.
- assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/font[1]", "orientation",
- "900");
+ sal_Int32 nRotation
+ = getXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/font[1]",
+ "orientation")
+ .toInt32();
+ CPPUNIT_ASSERT(nRotation >= 899 && nRotation <= 900);
// Test the second level of horizontal category axis labels orientation. The second level orientation should be horizontal.
assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/font[5]", "orientation",
"0");
More information about the Libreoffice-commits
mailing list