diff options
author | Andrey Loskutov | 2019-07-12 07:57:19 +0000 |
---|---|---|
committer | Andrey Loskutov | 2019-07-12 07:57:19 +0000 |
commit | 9a92492875f68e70d213a7e319b14b83a19652d8 (patch) | |
tree | 13450042bba2525fca714fb201c73534ab9541e8 | |
parent | 0bd3a714d8fc745e80c76e805bfee9fef8cd0491 (diff) | |
download | eclipse.platform.text-9a92492875f68e70d213a7e319b14b83a19652d8.tar.gz eclipse.platform.text-9a92492875f68e70d213a7e319b14b83a19652d8.tar.xz eclipse.platform.text-9a92492875f68e70d213a7e319b14b83a19652d8.zip |
Bug 547532 - fixed test compilation warningsY20190718-0450Y20190715-2335Y20190715-0900I20190717-1800I20190716-1800I20190715-1800I20190714-1800I20190713-1800I20190713-1105I20190713-0230I20190712-1800
They were introduced after disabling test fails due revert for bug
549110
Change-Id: I171662075e5ef1ed9bbef23e2469b39884146989
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2 files changed, 8 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 fe225fcf7f6..0cf28dbaf3f 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,7 +19,6 @@ 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; @@ -84,10 +83,10 @@ public class AnnotationOnTabTest { } }.waitForCondition(textWidget.getDisplay(), 2000)); DisplayHelper.sleep(textWidget.getDisplay(), 1000); - int referenceIndex = textWidget.getText().indexOf("reference"); - Rectangle referenceBounds = textWidget.getTextBounds(referenceIndex, referenceIndex); - Rectangle annotatedCharactedBounds = textWidget.getTextBounds(annotationIndex, annotationIndex); // XXX disabled due bug 549110 - // 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 7bb84635380..3cea6ca88e4 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,7 +26,6 @@ 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; @@ -141,11 +140,11 @@ public class LineContentBoundsDrawingTest { } }.waitForCondition(textWidget.getDisplay(), 2000)); DisplayHelper.sleep(textWidget.getDisplay(), 1000); - Rectangle textBounds= textWidget.getTextBounds(0, textWidget.getText().length() - 1); - int supposedMostRightPaintedPixel = textBounds.x + textBounds.width - 1; - int mostRightPaintedPixel= getMostRightPaintedPixel(textWidget); // XXX disabled due bug 549110 - // 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) { |