/hg/rhino-tests: Added new test testNewInstance into the test suite
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Sep 17 02:28:01 PDT 2013
changeset 12f27742973a in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=12f27742973a
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Sep 17 11:31:40 2013 +0200
Added new test testNewInstance into the test suite
BindingsClassTest.
diffstat:
ChangeLog | 6 ++++++
src/org/RhinoTests/CompilableClassTest.java | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diffs (40 lines):
diff -r 073edb9552f8 -r 12f27742973a ChangeLog
--- a/ChangeLog Mon Sep 16 09:40:40 2013 +0200
+++ b/ChangeLog Tue Sep 17 11:31:40 2013 +0200
@@ -1,3 +1,9 @@
+2013-09-17 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/CompilableClassTest.java:
+ Added new test testNewInstance into the test suite
+ BindingsClassTest.
+
2013-09-16 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/BindingsClassTest.java:
diff -r 073edb9552f8 -r 12f27742973a src/org/RhinoTests/CompilableClassTest.java
--- a/src/org/RhinoTests/CompilableClassTest.java Mon Sep 16 09:40:40 2013 +0200
+++ b/src/org/RhinoTests/CompilableClassTest.java Tue Sep 17 11:31:40 2013 +0200
@@ -1396,6 +1396,23 @@
}
/**
+ * Test for method javax.script.Compilable.getClass().newInstance()
+ */
+ protected void testNewInstance() {
+ try {
+ Object o = this.compilableClass.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.Compilable
*/
@SuppressWarnings("cast")
More information about the distro-pkg-dev
mailing list