Mercurial > hg > rhino-tests
changeset 233:073edb9552f8 draft
Added new test testNewInstance into the test suite
BindingsClassTest.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Mon, 16 Sep 2013 09:40:40 +0200 |
parents | 61ed92f655a5 |
children | 12f27742973a |
files | ChangeLog src/org/RhinoTests/BindingsClassTest.java |
diffstat | 2 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Sep 13 10:46:37 2013 +0200 +++ b/ChangeLog Mon Sep 16 09:40:40 2013 +0200 @@ -1,3 +1,9 @@ +2013-09-16 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/RhinoTests/BindingsClassTest.java: + Added new test testNewInstance into the test suite + BindingsClassTest. + 2013-09-13 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/RhinoTests/AbstractScriptEngineClassTest.java:
--- a/src/org/RhinoTests/BindingsClassTest.java Fri Sep 13 10:46:37 2013 +0200 +++ b/src/org/RhinoTests/BindingsClassTest.java Mon Sep 16 09:40:40 2013 +0200 @@ -1493,6 +1493,23 @@ } /** + * Test for method javax.script.Bindings.getClass().newInstance() + */ + protected void testNewInstance() { + try { + Object o = this.bindingsClass.newInstance(); + throw new AssertionError("Class.newInstance() does not throw any exception"); + } + catch (InstantiationException e) { + // expected exception + } + catch (IllegalAccessException e) { + // expected exception + } + + } + + /** * Test for instanceof operator applied to a class javax.script.Bindings */ @SuppressWarnings("cast")