Mercurial > hg > rhino-tests
changeset 300:1dc53f4e69f7 draft
Enhancement of the test testAsSubclass.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Tue, 14 Jan 2014 13:25:33 +0100 |
parents | 7810608a4b20 |
children | 287dddd8c593 |
files | ChangeLog src/org/RhinoTests/ScriptEngineClassTest.java |
diffstat | 2 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 13 13:03:16 2014 +0100 +++ b/ChangeLog Tue Jan 14 13:25:33 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-14 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/ScriptEngineClassTest.java: + Enhancement of the test testAsSubclass. + 2014-01-13 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/SimpleScriptContextClassTest.java:
--- a/src/org/RhinoTests/ScriptEngineClassTest.java Mon Jan 13 13:03:16 2014 +0100 +++ b/src/org/RhinoTests/ScriptEngineClassTest.java Tue Jan 14 13:25:33 2014 +0100 @@ -1373,6 +1373,54 @@ } try { + this.scriptEngineClass.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.scriptEngineClass.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.scriptEngineClass.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.scriptEngineClass.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.scriptEngineClass.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.scriptEngineClass.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.scriptEngineClass.asSubclass(java.awt.Color.class); throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception"); }