changeset 318:c7dba60bc06d draft

Added new test cases into CompiledScriptClassTest.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Wed, 12 Feb 2014 13:28:22 +0100
parents b5b48eaafbb8
children 087d4f0b3133
files ChangeLog src/org/RhinoTests/CompiledScriptClassTest.java
diffstat 2 files changed, 261 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Feb 11 10:08:43 2014 +0100
+++ b/ChangeLog	Wed Feb 12 13:28:22 2014 +0100
@@ -1,3 +1,8 @@
+2014-02-12  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/CompiledScriptClassTest.java:
+	Added new test cases into CompiledScriptClassTest.
+
 2014-02-11  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/CompilableClassTest.java:
--- a/src/org/RhinoTests/CompiledScriptClassTest.java	Tue Feb 11 10:08:43 2014 +0100
+++ b/src/org/RhinoTests/CompiledScriptClassTest.java	Wed Feb 12 13:28:22 2014 +0100
@@ -1317,6 +1317,54 @@
         }
 
         try {
+            this.compiledScriptClass.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.compiledScriptClass.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.compiledScriptClass.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.compiledScriptClass.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.compiledScriptClass.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.compiledScriptClass.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.compiledScriptClass.asSubclass(java.awt.Color.class);
             throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception");
         }
@@ -1341,6 +1389,214 @@
         }
 
         try {
+            this.compiledScriptClass.asSubclass(java.awt.Label.class);
+            throw new AssertionError("Class.asSubclass(java.awt.Label.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.awt.List.class);
+            throw new AssertionError("Class.asSubclass(java.awt.List.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.awt.Menu.class);
+            throw new AssertionError("Class.asSubclass(java.awt.Menu.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.File.class);
+            throw new AssertionError("Class.asSubclass(java.io.File.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.Reader.class);
+            throw new AssertionError("Class.asSubclass(java.io.Reader.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.Writer.class);
+            throw new AssertionError("Class.asSubclass(java.io.Writer.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.StringReader.class);
+            throw new AssertionError("Class.asSubclass(java.io.StringReader.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.StringWriter.class);
+            throw new AssertionError("Class.asSubclass(java.io.StringWriter.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.InputStream.class);
+            throw new AssertionError("Class.asSubclass(java.io.InputStream.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.OutputStream.class);
+            throw new AssertionError("Class.asSubclass(java.io.OutputStream.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.ObjectInputStream.class);
+            throw new AssertionError("Class.asSubclass(java.io.ObjectInputStream.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.io.ObjectOutputStream.class);
+            throw new AssertionError("Class.asSubclass(java.io.ObjectOutputStream.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.math.BigDecimal.class);
+            throw new AssertionError("Class.asSubclass(java.math.BigDecimal.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.math.BigInteger.class);
+            throw new AssertionError("Class.asSubclass(java.math.BigInteger.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.ArrayList.class);
+            throw new AssertionError("Class.asSubclass(java.util.ArrayList.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.LinkedList.class);
+            throw new AssertionError("Class.asSubclass(java.util.LinkedList.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.HashMap.class);
+            throw new AssertionError("Class.asSubclass(java.util.HashMap.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.TreeMap.class);
+            throw new AssertionError("Class.asSubclass(java.util.TreeMap.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.HashSet.class);
+            throw new AssertionError("Class.asSubclass(java.util.HashSet.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.TreeSet.class);
+            throw new AssertionError("Class.asSubclass(java.util.TreeSet.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.Stack.class);
+            throw new AssertionError("Class.asSubclass(java.util.Stack.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.Vector.class);
+            throw new AssertionError("Class.asSubclass(java.util.Vector.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.Hashtable.class);
+            throw new AssertionError("Class.asSubclass(java.util.Hashtable.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.Calendar.class);
+            throw new AssertionError("Class.asSubclass(java.util.Calendar.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.Arrays.class);
+            throw new AssertionError("Class.asSubclass(java.util.Arrays.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
+            this.compiledScriptClass.asSubclass(java.util.Collections.class);
+            throw new AssertionError("Class.asSubclass(java.util.Collections.class) does not throw any exception");
+        }
+        catch (Exception e) {
+            // expected exception
+        }
+
+        try {
             this.compiledScriptClass.asSubclass(javax.swing.JPanel.class);
             throw new AssertionError("Class.asSubclass(javax.swing.JPanel.class) does not throw any exception");
         }