/hg/rhino-tests: Added new test testNewInstance into the test suite
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Sep 26 00:50:50 PDT 2013
changeset a69643cea0a5 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=a69643cea0a5
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Sep 26 09:54:36 2013 +0200
Added new test testNewInstance into the test suite
ScriptEngineClassTest.
diffstat:
ChangeLog | 6 ++++++
src/org/RhinoTests/ScriptEngineClassTest.java | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diffs (40 lines):
diff -r d1076a7a7c31 -r a69643cea0a5 ChangeLog
--- a/ChangeLog Tue Sep 24 09:51:17 2013 +0200
+++ b/ChangeLog Thu Sep 26 09:54:36 2013 +0200
@@ -1,3 +1,9 @@
+2013-09-26 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/ScriptEngineClassTest.java:
+ Added new test testNewInstance into the test suite
+ ScriptEngineClassTest.
+
2013-09-24 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/ScriptContextClassTest.java:
diff -r d1076a7a7c31 -r a69643cea0a5 src/org/RhinoTests/ScriptEngineClassTest.java
--- a/src/org/RhinoTests/ScriptEngineClassTest.java Tue Sep 24 09:51:17 2013 +0200
+++ b/src/org/RhinoTests/ScriptEngineClassTest.java Thu Sep 26 09:54:36 2013 +0200
@@ -1273,6 +1273,23 @@
}
/**
+ * Test for method javax.script.ScriptEngine.getClass().newInstance()
+ */
+ protected void testNewInstance() {
+ try {
+ Object o = this.scriptEngineClass.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.ScriptEngine
*/
@SuppressWarnings("cast")
More information about the distro-pkg-dev
mailing list