8151697: [TEST] minor update of test/java/awt/image/multiresolution/BaseMultiResolutionImageTest.java
authoravstepan
Fri, 11 Mar 2016 19:45:03 +0300
changeset 36873 ed3edebf7d37
parent 36872 16a225f7de51
child 36874 09abfda883d2
8151697: [TEST] minor update of test/java/awt/image/multiresolution/BaseMultiResolutionImageTest.java Reviewed-by: alexsch
jdk/test/java/awt/image/multiresolution/BaseMultiResolutionImageTest.java
--- a/jdk/test/java/awt/image/multiresolution/BaseMultiResolutionImageTest.java	Fri Mar 11 14:06:14 2016 +0300
+++ b/jdk/test/java/awt/image/multiresolution/BaseMultiResolutionImageTest.java	Fri Mar 11 19:45:03 2016 +0300
@@ -191,6 +191,17 @@
         if (!passed) {
             throw new RuntimeException("Resolution variants list is modifiable!");
         }
+
+        passed = false;
+        try {
+            mrImage.getGraphics();
+        } catch (UnsupportedOperationException e) {
+            passed = true;
+        }
+
+        if (!passed) {
+            throw new RuntimeException("getGraphics() method shouldn't be supported!");
+        }
     }
 
     private static int getSize(int i) {