[Libreoffice-commits] core.git: sw/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 23 12:36:41 UTC 2019


 sw/qa/extras/rtfimport/rtfimport.cxx |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

New commits:
commit a7afdcd8d191248fd143743e818aa9985b95743c
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Tue Jan 22 13:58:17 2019 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Jan 23 13:36:13 2019 +0100

    tdf#90097 rtfimport: rewrite unit test so it run reliably
    
    Already broken for windows and mac, the numbers changed
    for me on Ubuntu when switching from gcc5 to gcc7 or gcc8.
    How it still  works on the tinderboxes etc I don't know.
    Anyway, by removing the obviously irrelevant actual numbers,
    the test still covers the original intent by ensuring that
    the top point is farther to the right than the bottom point.
    
    Change-Id: Ieeb7cd854847d47a11dc305db82371e2b8f85049
    Reviewed-on: https://gerrit.libreoffice.org/66724
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 4672c1910d08..0d29eea41d49 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1257,7 +1257,6 @@ DECLARE_RTFIMPORT_TEST(testClassificatonPaste, "hello.rtf")
     CPPUNIT_ASSERT_EQUAL(aOld, xText->getString());
 }
 
-#if !defined(MACOSX) && !defined(WNT)
 DECLARE_RTFIMPORT_TEST(testTdf90097, "tdf90097.rtf")
 {
     // Get the second child of the group shape.
@@ -1267,22 +1266,9 @@ DECLARE_RTFIMPORT_TEST(testTdf90097, "tdf90097.rtf")
     xShape->getPropertyValue("PolyPolygon") >>= aPolyPolySequence;
     uno::Sequence<awt::Point>& rPolygon = aPolyPolySequence[0];
 
-    // tdf#106792 These values were wrong all the time due to a missing
-    // conversion in SvxShapePolyPolygon::getPropertyValueImpl. There was no
-    // ForceMetricTo100th_mm -> the old results were in twips due to the
-    // object residing in Writer. The UNO API by definition is in 100thmm,
-    // thus I will correct the values here.
-    // Indeed need to use the Linux values, I have no idea why these differ
-    // from Mac/Win ones, but the disable above hints to that (maybe a problem
-    // of its own). Factor between Twips and 100thmm is ca. 1.76 -> stable change
-
     // Vertical flip for the line shape was ignored, so Y coordinates were swapped.
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4972), rPolygon[0].X); // was: 2819, win is 10927
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3463), rPolygon[0].Y); // was: 1963
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5617), rPolygon[1].X); // was: 3181, win is 11572
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2852), rPolygon[1].Y); // was: 1620
+    CPPUNIT_ASSERT(rPolygon[0].Y > rPolygon[1].Y);
 }
-#endif
 
 DECLARE_RTFIMPORT_TEST(testTdf91684, "tdf91684.rtf")
 {


More information about the Libreoffice-commits mailing list