Skip to content

Commit 4aa477a

Browse files
Test Failures
1 parent 39242ae commit 4aa477a

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
@@ -163,23 +163,23 @@ public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_gra
163163
Image image;
164164
IllegalArgumentException e;
165165

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

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

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

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

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

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

@@ -585,7 +585,7 @@ public void test_getBounds() {
585585
@Test
586586
public void test_getBoundsInPixels() {
587587
Rectangle initialBounds = new Rectangle(0, 0, 10, 20);
588-
Image image1 = new Image(display, (gc, width, height) -> {}, initialBounds.width, initialBounds.height);
588+
Image image1 = new Image(display, initialBounds.width, initialBounds.height);
589589
image1.dispose();
590590
SWTException e = assertThrows(SWTException.class, () -> image1.getBoundsInPixels());
591591
assertSWTProblem("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);
@@ -635,7 +635,7 @@ public void test_getBoundsInPixels() {
635635
@Test
636636
public void test_getImageDataCurrentZoom() {
637637
Rectangle bounds = new Rectangle(0, 0, 10, 20);
638-
Image image1 = new Image(display, (gc, width, height) -> {}, bounds.width, bounds.height);
638+
Image image1 = new Image(display, bounds.width, bounds.height);
639639
image1.dispose();
640640
SWTException e = assertThrows(SWTException.class, () -> image1.getImageDataAtCurrentZoom());
641641
assertSWTProblem("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);

0 commit comments

Comments
 (0)