@@ -119,40 +119,41 @@ public void test_ConstructorLorg_eclipse_swt_graphics_DeviceII() {
119119 image .dispose ();
120120}
121121
122+ @ SuppressWarnings ("deprecation" )
122123@ Test
123124public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle () {
124125 Image image ;
125126 IllegalArgumentException e ;
126127 Rectangle bounds1 = null ;
127- e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds1 . width , bounds1 . height ));
128+ e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds1 ));
128129 assertSWTProblem ("Incorrect exception thrown for rectangle == null" , SWT .ERROR_NULL_ARGUMENT , e );
129130
130131 Rectangle bounds2 = new Rectangle (0 , 0 , -1 , 10 );
131- e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds2 . width , bounds2 . height ));
132+ e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds2 ));
132133 assertSWTProblem ("Incorrect exception thrown for width < 0" , SWT .ERROR_INVALID_ARGUMENT , e );
133134
134135 Rectangle bounds3 = new Rectangle (0 , 0 , 0 , 10 );
135- e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds3 . width , bounds3 . height ));
136+ e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds3 ));
136137 assertSWTProblem ("Incorrect exception thrown for width == 0" , SWT .ERROR_INVALID_ARGUMENT , e );
137138
138139 Rectangle bounds4 = new Rectangle (0 , 0 , 10 , -1 );
139- e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds4 . width , bounds4 . height ));
140+ e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds4 ));
140141 assertSWTProblem ("Incorrect exception thrown for height < 0" , SWT .ERROR_INVALID_ARGUMENT , e );
141142
142143 Rectangle bounds5 = new Rectangle (0 , 0 , 10 , 0 );
143- e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds5 . width , bounds5 . height ));
144+ e = assertThrows (IllegalArgumentException .class , () -> new Image (display , bounds5 ));
144145 assertSWTProblem ("Incorrect exception thrown for height == 0" , SWT .ERROR_INVALID_ARGUMENT , e );
145146
146147 // valid images
147148 Rectangle bounds = new Rectangle (-1 , -10 , 10 , 10 );
148- image = new Image (display , bounds . width , bounds . height );
149+ image = new Image (display , bounds );
149150 image .dispose ();
150151
151152 bounds = new Rectangle (0 , 0 , 10 , 10 );
152- image = new Image (null , bounds . width , bounds . height );
153+ image = new Image (null , bounds );
153154 image .dispose ();
154155
155- image = new Image (display , bounds . width , bounds . height );
156+ image = new Image (display , bounds );
156157 image .dispose ();
157158}
158159
0 commit comments