/hg/rhino-tests: Nine new tests added into ScriptContextTest.

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri May 16 07:21:12 UTC 2014


changeset 7ec0f5310ca5 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=7ec0f5310ca5
author: ptisnovs
date: Fri May 16 09:21:05 2014 +0200

	Nine new tests added into ScriptContextTest.


diffstat:

 ChangeLog                                 |    5 +
 src/org/RhinoTests/ScriptContextTest.java |  135 ++++++++++++++++++++++++++++++
 2 files changed, 140 insertions(+), 0 deletions(-)

diffs (157 lines):

diff -r 324c54e484c1 -r 7ec0f5310ca5 ChangeLog
--- a/ChangeLog	Thu May 15 15:17:50 2014 +0200
+++ b/ChangeLog	Fri May 16 09:21:05 2014 +0200
@@ -1,3 +1,8 @@
+2014-05-16  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/ScriptContextTest.java:
+	Nine new tests added into ScriptContextTest.
+
 2014-05-15  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/ScriptContextTest.java:
diff -r 324c54e484c1 -r 7ec0f5310ca5 src/org/RhinoTests/ScriptContextTest.java
--- a/src/org/RhinoTests/ScriptContextTest.java	Thu May 15 15:17:50 2014 +0200
+++ b/src/org/RhinoTests/ScriptContextTest.java	Fri May 16 09:21:05 2014 +0200
@@ -212,6 +212,141 @@
     }
 
     /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute10() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute("name", "value", ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute11() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute("name", "", ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute12() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute("name", null, ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute13() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute("", "value", ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute14() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute("", "", ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute15() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute("", null, ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute16() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute(null, "value", ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute17() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute(null, "", ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
+     * Test for method SimpleScriptContext.setAttribute().
+     */
+    protected void testSetAttribute18() {
+        // tested object
+        ScriptContext object = new SimpleScriptContext();
+        try {
+            object.setAttribute(null, null, ScriptContext.GLOBAL_SCOPE);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            throw new AssertionError(e.getMessage());
+        }
+    }
+
+    /**
      * Entry point to this test case.
      *
      * @param args parameters passed from command line


More information about the distro-pkg-dev mailing list