diff options
author | Justin Luth <justin.luth@collabora.com> | 2018-08-29 11:43:50 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-08-29 13:00:51 +0200 |
commit | 6563b399aea5292d04e32511d0aac397aed76200 (patch) | |
tree | 1594a81d2e6cabdfb753597b75121e76fabea4e6 /sd/qa | |
parent | f41cbea9a49c3059498a1ff432ac545b296db5a5 (diff) |
fix sd_export_ooxml2 fail on Linux-rpm_deb-x86@71-TDF, MASTER
due to rounding differences, it was failing on 32bit linux only.
Test name: SdOOXMLExportTest2::testTdf91999_rotateShape
equality assertion failed
- Expected: 1449000
- Actual : 1448640
Test name: SdOOXMLExportTest2::testTdf114845_rotateShape
equality assertion failed
- Expected: 3287520
- Actual : 3287160
I also re-added the extra test that had previously
failed for a similar reason under Linux64 even.
Change-Id: I6c8be5ef1545d48f1e59319c3b3df1d2580e1f95
Reviewed-on: https://gerrit.libreoffice.org/59754
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index fdd65130a0b4..6920531af778 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1355,7 +1355,10 @@ void SdOOXMLExportTest2::testSmartartRotation2() xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:txBody/a:p/a:r/a:t", "Text"); assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:txBody/a:bodyPr", "rot", "10800000"); - assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "x", "2276280"); + double dX = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "x").toDouble(); + double dY = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "y").toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 2276280.0, dX, dX * .001); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 3158280.0, dY, dY * .001); } void SdOOXMLExportTest2::testTdf91999_rotateShape() @@ -1368,8 +1371,10 @@ void SdOOXMLExportTest2::testTdf91999_rotateShape() xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr", "name", "CustomShape 2"); assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm", "rot", "10800000"); - assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off", "x", "2960640"); - assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off", "y", "1449000"); + double dX = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off", "x").toDouble(); + double dY = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm/a:off", "y").toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 2960640.0, dX, dX * .001); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 1449000.0, dY, dY * .001); } void SdOOXMLExportTest2::testTdf114845_rotateShape() @@ -1382,8 +1387,10 @@ void SdOOXMLExportTest2::testTdf114845_rotateShape() xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:nvSpPr/p:cNvPr", "name", "CustomShape 5"); assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:spPr/a:xfrm", "flipV", "1"); - assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:spPr/a:xfrm/a:off", "x", "4059000"); - assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:spPr/a:xfrm/a:off", "y", "3287520"); + double dX = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:spPr/a:xfrm/a:off", "x").toDouble(); + double dY = getXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:spPr/a:xfrm/a:off", "y").toDouble(); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 4059000.0, dX, dX * .001); + CPPUNIT_ASSERT_DOUBLES_EQUAL( 3287520.0, dY, dY * .001); } void SdOOXMLExportTest2::testGroupsPosition() |