changeset 275:cf0d5f189876 draft

Added new testGetResourceNPETest case into CompiledScriptClassTest.java.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Thu, 21 Nov 2013 09:26:25 +0100
parents be39ca66b86d
children d7a085f139ba
files ChangeLog src/org/RhinoTests/CompiledScriptClassTest.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Nov 20 09:58:25 2013 +0100
+++ b/ChangeLog	Thu Nov 21 09:26:25 2013 +0100
@@ -1,3 +1,9 @@
+2013-11-21  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* src/org/RhinoTests/CompiledScriptClassTest.java:
+	Added new testGetResourceNPETest case into
+	CompiledScriptClassTest.java.
+
 2013-11-20  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* src/org/RhinoTests/BindingsClassTest.java:
--- a/src/org/RhinoTests/CompiledScriptClassTest.java	Wed Nov 20 09:58:25 2013 +0100
+++ b/src/org/RhinoTests/CompiledScriptClassTest.java	Thu Nov 21 09:26:25 2013 +0100
@@ -1582,6 +1582,19 @@
     }
 
     /**
+     * Test for method javax.script.CompiledScript.getClass().getResourceNPETest()
+     */
+    protected void testGetResourceNPETest() {
+        try {
+            Object resource = this.compiledScriptClass.getResource(null);
+            throw new AssertionError("NullPointerException expected!");
+        }
+        catch (NullPointerException e) {
+            //This is OK OK
+        }
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.CompiledScript
      */
     @SuppressWarnings("cast")