Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2019-07-17 10:48:55 +0000
committerMickael Istria2019-07-18 14:48:06 +0000
commitae9de41626c2834320fae8356a2b5874f4ea949a (patch)
treed6703c045903c45a9e384c8b7a4c22b9b1ce639c
parent5dacb5c72fb91737feedb5f20ff741a078707c61 (diff)
downloadeclipse.platform.text-ae9de41626c2834320fae8356a2b5874f4ea949a.tar.gz
eclipse.platform.text-ae9de41626c2834320fae8356a2b5874f4ea949a.tar.xz
eclipse.platform.text-ae9de41626c2834320fae8356a2b5874f4ea949a.zip
This reverts commit 0bd3a714d8fc745e80c76e805bfee9fef8cd0491 Re-enables the tests since upstream is fixed Signed-off-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/AnnotationOnTabTest.java10
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/LineContentBoundsDrawingTest.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/AnnotationOnTabTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/AnnotationOnTabTest.java
index 0cf28dbaf3f..4cf6795c238 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/AnnotationOnTabTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/AnnotationOnTabTest.java
@@ -19,6 +19,7 @@ import org.junit.Test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Shell;
@@ -83,10 +84,9 @@ public class AnnotationOnTabTest {
}
}.waitForCondition(textWidget.getDisplay(), 2000));
DisplayHelper.sleep(textWidget.getDisplay(), 1000);
- // XXX disabled due bug 549110
-// int referenceIndex = textWidget.getText().indexOf("reference");
-// Rectangle referenceBounds = textWidget.getTextBounds(referenceIndex, referenceIndex);
-// Rectangle annotatedCharactedBounds = textWidget.getTextBounds(annotationIndex, annotationIndex);
-// Assert.assertTrue("Annotation didn't shift target character to the right, it most likely replaced the tab instead of expanding it", referenceBounds.x < annotatedCharactedBounds.x);
+ int referenceIndex = textWidget.getText().indexOf("reference");
+ Rectangle referenceBounds = textWidget.getTextBounds(referenceIndex, referenceIndex);
+ Rectangle annotatedCharactedBounds = textWidget.getTextBounds(annotationIndex, annotationIndex);
+ Assert.assertTrue("Annotation didn't shift target character to the right, it most likely replaced the tab instead of expanding it", referenceBounds.x < annotatedCharactedBounds.x);
}
}
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/LineContentBoundsDrawingTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/LineContentBoundsDrawingTest.java
index 3cea6ca88e4..f1606aac727 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/LineContentBoundsDrawingTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/source/inlined/LineContentBoundsDrawingTest.java
@@ -26,6 +26,7 @@ import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Shell;
@@ -140,11 +141,10 @@ public class LineContentBoundsDrawingTest {
}
}.waitForCondition(textWidget.getDisplay(), 2000));
DisplayHelper.sleep(textWidget.getDisplay(), 1000);
- // XXX disabled due bug 549110
-// Rectangle textBounds= textWidget.getTextBounds(0, textWidget.getText().length() - 1);
-// int supposedMostRightPaintedPixel = textBounds.x + textBounds.width - 1;
-// int mostRightPaintedPixel= getMostRightPaintedPixel(textWidget);
-// Assert.assertEquals(supposedMostRightPaintedPixel, mostRightPaintedPixel, 1.5); // use double comparison with delta to tolerate variation from a system to the other
+ Rectangle textBounds= textWidget.getTextBounds(0, textWidget.getText().length() - 1);
+ int supposedMostRightPaintedPixel = textBounds.x + textBounds.width - 1;
+ int mostRightPaintedPixel= getMostRightPaintedPixel(textWidget);
+ Assert.assertEquals(supposedMostRightPaintedPixel, mostRightPaintedPixel, 1.5); // use double comparison with delta to tolerate variation from a system to the other
}
public int getMostRightPaintedPixel(StyledText widget) {

Back to the top