Mercurial > hg > rhino-tests
changeset 293:ca00dabf6d50 draft
Enhancement of the test testAsSubclass.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Fri, 03 Jan 2014 13:41:54 +0100 |
parents | 1cf2215e04c1 |
children | ba7a236d21c1 |
files | ChangeLog src/org/RhinoTests/AbstractScriptEngineClassTest.java |
diffstat | 2 files changed, 54 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jan 02 12:06:14 2014 +0100 +++ b/ChangeLog Fri Jan 03 13:41:54 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-03 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/AbstractScriptEngineClassTest.java: + Enhancement of the test testAsSubclass. + 2014-01-02 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/AbstractScriptEngineClassTest.java:
--- a/src/org/RhinoTests/AbstractScriptEngineClassTest.java Thu Jan 02 12:06:14 2014 +0100 +++ b/src/org/RhinoTests/AbstractScriptEngineClassTest.java Fri Jan 03 13:41:54 2014 +0100 @@ -887,6 +887,7 @@ methodsThatShouldExist_jdk6.put("getBindings", new Class[] {int.class}); methodsThatShouldExist_jdk6.put("setBindings", new Class[] {javax.script.Bindings.class, int.class}); methodsThatShouldExist_jdk6.put("eval", new Class[] {java.io.Reader.class, javax.script.Bindings.class}); + methodsThatShouldExist_jdk6.put("eval", new Class[] {java.io.Reader.class, javax.script.Bindings.class}); methodsThatShouldExist_jdk6.put("eval", new Class[] {java.lang.String.class, javax.script.Bindings.class}); methodsThatShouldExist_jdk6.put("eval", new Class[] {java.io.Reader.class}); methodsThatShouldExist_jdk6.put("eval", new Class[] {java.lang.String.class}); @@ -1429,6 +1430,54 @@ } try { + this.abstractScriptEngineClass.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.abstractScriptEngineClass.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.abstractScriptEngineClass.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.abstractScriptEngineClass.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.abstractScriptEngineClass.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.abstractScriptEngineClass.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.abstractScriptEngineClass.asSubclass(java.awt.Color.class); throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception"); }