changeset 297:f48c989ce6fe draft

Enhancement of the test testAsSubclass.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Thu, 09 Jan 2014 12:45:38 +0100
parents 276a8320993a
children fffe244ab2da
files ChangeLog src/org/RhinoTests/ScriptExceptionClassTest.java
diffstat 2 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jan 08 11:17:38 2014 +0100
+++ b/ChangeLog	Thu Jan 09 12:45:38 2014 +0100
@@ -1,3 +1,8 @@
+2014-01-09  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/ScriptExceptionClassTest.java:
+	Enhancement of the test testAsSubclass.
+
 2014-01-08  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/SimpleBindingsClassTest.java:
--- a/src/org/RhinoTests/ScriptExceptionClassTest.java	Wed Jan 08 11:17:38 2014 +0100
+++ b/src/org/RhinoTests/ScriptExceptionClassTest.java	Thu Jan 09 12:45:38 2014 +0100
@@ -1390,6 +1390,54 @@
         }
 
         try {
+            this.scriptExceptionClass.asSubclass(java.applet.Applet.class);
+            throw new AssertionError("Class.asSubclass(java.applet.Applet.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.scriptExceptionClass.asSubclass(java.awt.Button.class);
+            throw new AssertionError("Class.asSubclass(java.awt.Button.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.scriptExceptionClass.asSubclass(java.awt.Canvas.class);
+            throw new AssertionError("Class.asSubclass(java.awt.Canvas.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.scriptExceptionClass.asSubclass(java.awt.CardLayout.class);
+            throw new AssertionError("Class.asSubclass(java.awt.CardLayout.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.scriptExceptionClass.asSubclass(java.awt.Checkbox.class);
+            throw new AssertionError("Class.asSubclass(java.awt.Checkbox.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.scriptExceptionClass.asSubclass(java.awt.Choice.class);
+            throw new AssertionError("Class.asSubclass(java.awt.Choice.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
             this.scriptExceptionClass.asSubclass(java.awt.Color.class);
             throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception");
         }