Mercurial > hg > rhino-tests
changeset 295:e13b59d43d0d draft
Enhancement of the test testAsSubclass.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Tue, 07 Jan 2014 11:58:06 +0100 |
parents | ba7a236d21c1 |
children | 276a8320993a |
files | ChangeLog src/org/RhinoTests/SimpleScriptContextClassTest.java |
diffstat | 2 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 06 11:23:56 2014 +0100 +++ b/ChangeLog Tue Jan 07 11:58:06 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-07 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/SimpleScriptContextClassTest.java: + Enhancement of the test testAsSubclass. + 2014-01-06 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/BindingsClassTest.java:
--- a/src/org/RhinoTests/SimpleScriptContextClassTest.java Mon Jan 06 11:23:56 2014 +0100 +++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java Tue Jan 07 11:58:06 2014 +0100 @@ -1436,6 +1436,54 @@ } try { + this.simpleScriptContextClass.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.simpleScriptContextClass.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.simpleScriptContextClass.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.simpleScriptContextClass.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.simpleScriptContextClass.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.simpleScriptContextClass.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.simpleScriptContextClass.asSubclass(java.awt.Color.class); throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception"); }