[Libreoffice-commits] core.git: qadevOOo/tests

Stephan Bergmann sbergman at redhat.com
Mon Feb 2 07:50:57 PST 2015


 qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 48f704c3e1c08ae6e3eee450bf08712dc4caf460
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 2 16:33:20 2015 +0100

    Revert "fdo#55997: Work around slight offset causing sc_unoapi failure"
    
    This reverts commit ed851f1316d34d1ecd60e75d04ed21b7bffdbf00, the underlying
    problem causing JunitTest_sc_unoapi's
    
    > checking: [sc.ScModelObj::com::sun::star::sheet::XDocumentAuditing] is iface: [com.sun.star.sheet.XDocumentAuditing] testcode: [ifc.sheet._XDocumentAuditing]
    > Shape Type: com.sun.star.drawing.LineShape
    > LOG> Execute: refreshArrows()
    > Shape Type: com.sun.star.drawing.LineShape
    > Shape Type: com.sun.star.drawing.LineShape
    > Method refreshArrows() finished with state OK
    
    to fail appears to be fixed meanwhile.

diff --git a/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java b/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java
index f87d381..2d35679 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing.java
@@ -138,11 +138,6 @@ public class _XDocumentAuditing extends MultiMethodTest {
         dispatch(xModel.getCurrentController().getFrame(), tParam.getMSF(), ".uno:AutoRefreshArrows", props);
     }
 
-    private static boolean maxDelta(int x, int y, int max) {
-        assert max >= 0;
-        return Math.abs(((long) x) - ((long) y)) <= max;
-    }
-
     public void _refreshArrows() {
         boolean result = true;
 
@@ -161,7 +156,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
         Point p1 = pos;
 
         // points have to be the same: if not we have an auto update
-        boolean res = maxDelta(p0.X, p1.X, 1) && maxDelta(p0.Y, p1.Y, 1);
+        boolean res = (p0.X == p1.X && p0.Y == p1.Y);
         result &= res;
         if (!res)
             log.println("Arrow has been refreshed, but this should have been switched off.");
@@ -172,7 +167,7 @@ public class _XDocumentAuditing extends MultiMethodTest {
         Point p2 = pos;
 
         // points have to differ
-        res = !(maxDelta(p1.X, p2.X, 1) && maxDelta(p1.Y, p2.Y, 1));
+        res = (p1.X != p2.X || p1.Y != p2.Y);
         result &= res;
         if (!res)
             log.println("Arrow has not been refreshed.");


More information about the Libreoffice-commits mailing list