Mercurial > hg > rhino-tests
changeset 298:fffe244ab2da draft
Enhancement of the test testAsSubclass.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Fri, 10 Jan 2014 11:19:05 +0100 |
parents | f48c989ce6fe |
children | 7810608a4b20 |
files | ChangeLog src/org/RhinoTests/ScriptContextClassTest.java |
diffstat | 2 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jan 09 12:45:38 2014 +0100 +++ b/ChangeLog Fri Jan 10 11:19:05 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-10 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/ScriptContextClassTest.java: + Enhancement of the test testAsSubclass. + 2014-01-09 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/ScriptExceptionClassTest.java:
--- a/src/org/RhinoTests/ScriptContextClassTest.java Thu Jan 09 12:45:38 2014 +0100 +++ b/src/org/RhinoTests/ScriptContextClassTest.java Fri Jan 10 11:19:05 2014 +0100 @@ -1314,6 +1314,54 @@ } try { + this.scriptContextClass.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.scriptContextClass.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.scriptContextClass.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.scriptContextClass.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.scriptContextClass.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.scriptContextClass.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.scriptContextClass.asSubclass(java.awt.Color.class); throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception"); }