Skip to content

Commit 5e92ab7

Browse files
Test Failures
1 parent ac7a11d commit 5e92ab7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,23 @@ public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_gra
162162
Image image;
163163
IllegalArgumentException e;
164164

165-
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, (gc, width, height) -> {}, -1, 10));
165+
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, -1, 10));
166166
assertSWTProblem("Incorrect exception thrown for width < 0", SWT.ERROR_INVALID_ARGUMENT, e);
167167

168-
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, (gc, width, height) -> {}, 0, 10));
168+
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, 0, 10));
169169
assertSWTProblem("Incorrect exception thrown for width == 0", SWT.ERROR_INVALID_ARGUMENT, e);
170170

171-
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, (gc, width, height) -> {}, 10, -1));
171+
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, 10, -1));
172172
assertSWTProblem("Incorrect exception thrown for height < 0", SWT.ERROR_INVALID_ARGUMENT, e);
173173

174-
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, (gc, width, height) -> {}, 10, 0));
174+
e = assertThrows(IllegalArgumentException.class, () -> new Image(display, 10, 0));
175175
assertSWTProblem("Incorrect exception thrown for height == 0", SWT.ERROR_INVALID_ARGUMENT, e);
176176

177177
// valid images
178-
image = new Image(null, (gc, width, height) -> {}, 10, 10);
178+
image = new Image(null, 10, 10);
179179
image.dispose();
180180

181-
image = new Image(display, (gc, width, height) -> {}, 10, 10);
181+
image = new Image(display, 10, 10);
182182
image.dispose();
183183
}
184184

@@ -567,7 +567,7 @@ public void test_getBounds() {
567567
@Test
568568
public void test_getBoundsInPixels() {
569569
Rectangle initialBounds = new Rectangle(0, 0, 10, 20);
570-
Image image1 = new Image(display, (gc, width, height) -> {}, initialBounds.width, initialBounds.height);
570+
Image image1 = new Image(display, initialBounds.width, initialBounds.height);
571571
image1.dispose();
572572
SWTException e = assertThrows(SWTException.class, () -> image1.getBoundsInPixels());
573573
assertSWTProblem("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);
@@ -617,7 +617,7 @@ public void test_getBoundsInPixels() {
617617
@Test
618618
public void test_getImageDataCurrentZoom() {
619619
Rectangle bounds = new Rectangle(0, 0, 10, 20);
620-
Image image1 = new Image(display, (gc, width, height) -> {}, bounds.width, bounds.height);
620+
Image image1 = new Image(display, bounds.width, bounds.height);
621621
image1.dispose();
622622
SWTException e = assertThrows(SWTException.class, () -> image1.getImageDataAtCurrentZoom());
623623
assertSWTProblem("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);

0 commit comments

Comments
 (0)