/hg/rhino-tests: Added new test testGetResourceAsStreamPositiveT...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon Feb 24 01:46:07 PST 2014


changeset e97b81e2f125 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=e97b81e2f125
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Feb 24 10:50:30 2014 +0100

	Added new test testGetResourceAsStreamPositiveTest into SimpleBindingsClassTest.


diffstat:

 ChangeLog                                       |   6 ++++++
 src/org/RhinoTests/SimpleBindingsClassTest.java |  13 +++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diffs (36 lines):

diff -r cc40267835dc -r e97b81e2f125 ChangeLog
--- a/ChangeLog	Fri Feb 14 14:09:52 2014 +0100
+++ b/ChangeLog	Mon Feb 24 10:50:30 2014 +0100
@@ -1,3 +1,9 @@
+2014-02-24  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/SimpleBindingsClassTest.java:
+	Added new test testGetResourceAsStreamPositiveTest into
+	SimpleBindingsClassTest.
+
 2014-02-14  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/CompiledScriptClassTest.java:
diff -r cc40267835dc -r e97b81e2f125 src/org/RhinoTests/SimpleBindingsClassTest.java
--- a/src/org/RhinoTests/SimpleBindingsClassTest.java	Fri Feb 14 14:09:52 2014 +0100
+++ b/src/org/RhinoTests/SimpleBindingsClassTest.java	Mon Feb 24 10:50:30 2014 +0100
@@ -2080,6 +2080,19 @@
     }
 
     /**
+     * Test for method javax.script.SimpleBindings.getClass().getResourceAsStreamNPETest()
+     */
+    protected void testGetResourceAsStreamNPETest() {
+        try {
+            Object resource = this.simpleBindingsClass.getResourceAsStream(null);
+            throw new AssertionError("NullPointerException expected!");
+        }
+        catch (NullPointerException e) {
+            //This is OK OK
+        }
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.SimpleBindings
      */
     @SuppressWarnings("cast")


More information about the distro-pkg-dev mailing list