/hg/rhino-tests: Added new test testNewInstance into the test suite
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Fri Sep 20 02:12:12 PDT 2013
changeset 361269035966 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=361269035966
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Sep 20 11:15:56 2013 +0200
Added new test testNewInstance into the test suite
CompilableClassTest.
diffstat:
ChangeLog | 6 ++++++
src/org/RhinoTests/CompiledScriptClassTest.java | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diffs (40 lines):
diff -r 83faff14e207 -r 361269035966 ChangeLog
--- a/ChangeLog Thu Sep 19 09:51:27 2013 +0200
+++ b/ChangeLog Fri Sep 20 11:15:56 2013 +0200
@@ -1,3 +1,9 @@
+2013-09-20 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/CompiledScriptClassTest.java:
+ Added new test testNewInstance into the test suite
+ CompilableClassTest.
+
2013-09-19 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/SimpleScriptContextClassTest.java:
diff -r 83faff14e207 -r 361269035966 src/org/RhinoTests/CompiledScriptClassTest.java
--- a/src/org/RhinoTests/CompiledScriptClassTest.java Thu Sep 19 09:51:27 2013 +0200
+++ b/src/org/RhinoTests/CompiledScriptClassTest.java Fri Sep 20 11:15:56 2013 +0200
@@ -1565,6 +1565,23 @@
}
/**
+ * Test for method javax.script.CompiledScript.getClass().newInstance()
+ */
+ protected void testNewInstance() {
+ try {
+ Object o = this.compiledScriptClass.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.CompiledScript
*/
@SuppressWarnings("cast")
More information about the distro-pkg-dev
mailing list