/hg/rhino-tests: Added new testGetResourceNPETest and testGetRes...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Fri Nov 22 00:07:23 PST 2013
changeset d7a085f139ba in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=d7a085f139ba
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Nov 22 09:11:17 2013 +0100
Added new testGetResourceNPETest and testGetResourceNegativeTest cases
into ScriptEngineClassTest.java.
diffstat:
ChangeLog | 7 +++++++
src/org/RhinoTests/ScriptEngineClassTest.java | 21 +++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diffs (45 lines):
diff -r cf0d5f189876 -r d7a085f139ba ChangeLog
--- a/ChangeLog Thu Nov 21 09:26:25 2013 +0100
+++ b/ChangeLog Fri Nov 22 09:11:17 2013 +0100
@@ -1,3 +1,10 @@
+2013-11-22 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/ScriptEngineClassTest.java:
+ Added new testGetResourceNPETest and
+ testGetResourceNegativeTest cases into
+ ScriptEngineClassTest.java.
+
2013-11-21 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/CompiledScriptClassTest.java:
diff -r cf0d5f189876 -r d7a085f139ba src/org/RhinoTests/ScriptEngineClassTest.java
--- a/src/org/RhinoTests/ScriptEngineClassTest.java Thu Nov 21 09:26:25 2013 +0100
+++ b/src/org/RhinoTests/ScriptEngineClassTest.java Fri Nov 22 09:11:17 2013 +0100
@@ -1638,6 +1638,27 @@
}
/**
+ * Test for method javax.script.ScriptEngine.getClass().getResourceNPETest()
+ */
+ protected void testGetResourceNPETest() {
+ try {
+ Object resource = this.scriptEngineClass.getResource(null);
+ throw new AssertionError("NullPointerException expected!");
+ }
+ catch (NullPointerException e) {
+ //This is OK OK
+ }
+ }
+
+ /**
+ * Test for method javax.script.ScriptEngine.getClass().getResourceNegativeTest()
+ */
+ protected void testGetResourceNegativeTest() {
+ Object resource = this.scriptEngineClass.getResource("unknown");
+ assertNull(resource, "getResource() does not return null");
+ }
+
+ /**
* Test for method javax.script.ScriptEngine.getClass().getResourcePositiveTest()
*/
protected void testGetResourcePositiveTest() {
More information about the distro-pkg-dev
mailing list