Mercurial > hg > rhino-tests
changeset 241:1bdd275b1a8d draft
Updated one test case in ScriptExceptionClassTest.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Fri, 27 Sep 2013 09:45:37 +0200 |
parents | a69643cea0a5 |
children | 8055f8294f0e |
files | ChangeLog src/org/RhinoTests/ScriptExceptionClassTest.java |
diffstat | 2 files changed, 69 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Sep 26 09:54:36 2013 +0200 +++ b/ChangeLog Fri Sep 27 09:45:37 2013 +0200 @@ -1,3 +1,8 @@ +2013-09-27 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/ScriptExceptionClassTest.java: + Updated one test case in ScriptExceptionClassTest. + 2013-09-26 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/ScriptEngineClassTest.java:
--- a/src/org/RhinoTests/ScriptExceptionClassTest.java Thu Sep 26 09:54:36 2013 +0200 +++ b/src/org/RhinoTests/ScriptExceptionClassTest.java Fri Sep 27 09:45:37 2013 +0200 @@ -1366,6 +1366,30 @@ } try { + this.scriptExceptionClass.asSubclass(java.lang.String.class); + throw new AssertionError("Class.asSubclass(java.lang.String.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.scriptExceptionClass.asSubclass(java.lang.StringBuffer.class); + throw new AssertionError("Class.asSubclass(java.lang.StringBuffer.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.scriptExceptionClass.asSubclass(java.lang.StringBuilder.class); + throw new AssertionError("Class.asSubclass(java.lang.StringBuilder.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { this.scriptExceptionClass.asSubclass(java.awt.Color.class); throw new AssertionError("Class.asSubclass(java.awt.Color.class) does not throw any exception"); } @@ -1381,6 +1405,46 @@ // expected exception } + try { + this.scriptExceptionClass.asSubclass(java.awt.Image.class); + throw new AssertionError("Class.asSubclass(java.awt.Image.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.scriptExceptionClass.asSubclass(javax.swing.JPanel.class); + throw new AssertionError("Class.asSubclass(javax.swing.JPanel.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.scriptExceptionClass.asSubclass(javax.swing.JColorChooser.class); + throw new AssertionError("Class.asSubclass(javax.swing.JColorChooser.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.scriptExceptionClass.asSubclass(javax.swing.JScrollBar.class); + throw new AssertionError("Class.asSubclass(javax.swing.JScrollBar.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + + try { + this.scriptExceptionClass.asSubclass(javax.swing.JSlider.class); + throw new AssertionError("Class.asSubclass(javax.swing.JSlider.class) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } /**