/hg/rhino-tests: Added new test testNewInstance into the test suite
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Sep 16 00:36:55 PDT 2013
changeset 073edb9552f8 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=073edb9552f8
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Sep 16 09:40:40 2013 +0200
Added new test testNewInstance into the test suite
BindingsClassTest.
diffstat:
ChangeLog | 6 ++++++
src/org/RhinoTests/BindingsClassTest.java | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diffs (40 lines):
diff -r 61ed92f655a5 -r 073edb9552f8 ChangeLog
--- 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 at redhat.com>
+
+ * src/org/RhinoTests/BindingsClassTest.java:
+ Added new test testNewInstance into the test suite
+ BindingsClassTest.
+
2013-09-13 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/AbstractScriptEngineClassTest.java:
diff -r 61ed92f655a5 -r 073edb9552f8 src/org/RhinoTests/BindingsClassTest.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")
More information about the distro-pkg-dev
mailing list