svgio/qa/cppunit/SvgImportTest.cxx             |    2 +-
 svgio/qa/cppunit/data/CssClassRedefinition.svg |    2 +-
 vcl/qa/cppunit/pdfexport/pdfexport.cxx         |   20 ++++++++++----------
 3 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 32144b5dc617d5a375eeadf25b5b62befb529785
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Mon Jul 17 13:58:30 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Sun Jul 23 06:00:20 2023 +0200

    Make CppunitTest_vcl_pdfexport CPPUNIT_TEST_NAME=testTdf108963 less 
sensitive
    
    The test does not need all that precision, without the bug fix for
    tdf#108963 it fails with:
    
    double equality assertion failed
    - Expected: 245
    - Actual  : 255.401992797852
    - Delta   : 0.999
    
    Change-Id: Iae20417465e7c43f5be2819f710f768645dc3253
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154522
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index b2e72df31e3f..aaf3998eb99a 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -770,36 +770,36 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf108963)
                 = pPdfPageObject->getPathSegment(0);
             CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Moveto, 
pSegment->getType());
             basegfx::B2DPoint aPoint = pSegment->getPoint();
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(245.367, aPoint.getX(), 0.0005);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(244.232, aPoint.getY(), 0.0005);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(245, aPoint.getX(), 0.999);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(244, aPoint.getY(), 0.999);
             CPPUNIT_ASSERT(!pSegment->isClosed());
 
             pSegment = pPdfPageObject->getPathSegment(1);
             CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Lineto, 
pSegment->getType());
             aPoint = pSegment->getPoint();
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(275.216, aPoint.getX(), 0.0005);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(267.732, aPoint.getY(), 0.0005);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(275, aPoint.getX(), 0.999);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(267, aPoint.getY(), 0.999);
             CPPUNIT_ASSERT(!pSegment->isClosed());
 
             pSegment = pPdfPageObject->getPathSegment(2);
             CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Lineto, 
pSegment->getType());
             aPoint = pSegment->getPoint();
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(287.660, aPoint.getX(), 0.0005);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(251.914, aPoint.getY(), 0.0005);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(287, aPoint.getX(), 0.999);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(251, aPoint.getY(), 0.999);
             CPPUNIT_ASSERT(!pSegment->isClosed());
 
             pSegment = pPdfPageObject->getPathSegment(3);
             CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Lineto, 
pSegment->getType());
             aPoint = pSegment->getPoint();
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(257.811, aPoint.getX(), 0.0005);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(228.443, aPoint.getY(), 0.0005);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(257, aPoint.getX(), 0.999);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(228, aPoint.getY(), 0.999);
             CPPUNIT_ASSERT(!pSegment->isClosed());
 
             pSegment = pPdfPageObject->getPathSegment(4);
             CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFSegmentType::Lineto, 
pSegment->getType());
             aPoint = pSegment->getPoint();
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(245.367, aPoint.getX(), 0.0005);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL(244.232, aPoint.getY(), 0.0005);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(245, aPoint.getX(), 0.999);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(244, aPoint.getY(), 0.999);
             CPPUNIT_ASSERT(pSegment->isClosed());
         }
     }
commit 7774e0bb716d6f60e32f259d49d2e07e5b0de792
Author:     Khaled Hosny <kha...@libreoffice.org>
AuthorDate: Sun Jul 16 07:30:02 2023 +0300
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Sun Jul 23 06:00:10 2023 +0200

    Make CppunitTest_svgio CPPUNIT_TEST_NAME=testCssClassRedefinition more 
robust
    
    The commit:
    
    commit 9e83d35c4a22bcb465f0736dda9b752b29f83959
    Date:   Thu Jun 23 21:52:52 2022 +0200
    
        Make CppunitTest_svgio CPPUNIT_TEST_NAME=Test::testCssClassRedefinition 
robust
    
    Changed the font from generic Sans to Open Symbol to avoid failure when a
    different font is used, but it didn’t change the text string to a one
    supported by Open Symbol, so font fallback would still make the test
    fail. Change the text string to “012” which is supported by Open Symbol.
    
    Change-Id: I6e6ba22614ef1bafe5aece05c42d57d71923380c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154492
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index 0a976eb276e0..5845b7ea6f52 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -1512,7 +1512,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCssClassRedefinition)
     drawinglayer::Primitive2dXmlDump dumper;
     xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(Primitive2DContainer(aSequence));
     CPPUNIT_ASSERT (pDocument);
-    assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "test");
+    assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"text", "012");
     assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"fontcolor", "#ff0000");
     assertXPath(
         pDocument, "/primitive2D/transform/textsimpleportion[1]", 
"familyname", "Open Symbol");
diff --git a/svgio/qa/cppunit/data/CssClassRedefinition.svg 
b/svgio/qa/cppunit/data/CssClassRedefinition.svg
index 384cf88482f9..591f07f8b42d 100644
--- a/svgio/qa/cppunit/data/CssClassRedefinition.svg
+++ b/svgio/qa/cppunit/data/CssClassRedefinition.svg
@@ -8,6 +8,6 @@
     <!-- finally c1 should be equal to fill:#ff0000 and font-family:Sans -->
     </style>
     <text x="20" y="20" >
-        <tspan class="c1">test</tspan>
+        <tspan class="c1">012</tspan>
     </text>
 </svg>

Reply via email to