changeset 294:ba7a236d21c1 draft

Enhancement of the test testAsSubclass.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Mon, 06 Jan 2014 11:23:56 +0100
parents ca00dabf6d50
children e13b59d43d0d
files ChangeLog src/org/RhinoTests/BindingsClassTest.java
diffstat 2 files changed, 53 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jan 03 13:41:54 2014 +0100
+++ b/ChangeLog	Mon Jan 06 11:23:56 2014 +0100
@@ -1,3 +1,8 @@
+2014-01-06  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/BindingsClassTest.java:
+	Enhancement of the test testAsSubclass.
+
 2014-01-03  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/AbstractScriptEngineClassTest.java:
--- a/src/org/RhinoTests/BindingsClassTest.java	Fri Jan 03 13:41:54 2014 +0100
+++ b/src/org/RhinoTests/BindingsClassTest.java	Mon Jan 06 11:23:56 2014 +0100
@@ -1245,6 +1245,54 @@
         }
 
         try {
+            this.bindingsClass.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.bindingsClass.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.bindingsClass.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.bindingsClass.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.bindingsClass.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.bindingsClass.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.bindingsClass.asSubclass(java.awt.Color.class);
             throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception");
         }