/hg/rhino-tests: Added four new tests testGetEnumConstants(), te...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon Jul 22 01:18:16 PDT 2013


changeset 993887993a34 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=993887993a34
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Jul 22 10:19:45 2013 +0200

	Added four new tests testGetEnumConstants(), testGetTypeParameters(),
	testGetSigners() and testDesiredAssertionStatus()
	into SimpleScriptContextClassTest.


diffstat:

 ChangeLog                                            |   9 +++++
 src/org/RhinoTests/CompiledScriptClassTest.java      |   2 +
 src/org/RhinoTests/SimpleScriptContextClassTest.java |  33 ++++++++++++++++++++
 3 files changed, 44 insertions(+), 0 deletions(-)

diffs (71 lines):

diff -r ff7b6005f5fb -r 993887993a34 ChangeLog
--- a/ChangeLog	Fri Jul 19 11:55:36 2013 +0200
+++ b/ChangeLog	Mon Jul 22 10:19:45 2013 +0200
@@ -1,3 +1,12 @@
+2013-07-22  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/CompiledScriptClassTest.java:
+	Added missing imports.
+	* src/org/RhinoTests/SimpleScriptContextClassTest.java:
+	Added four new tests testGetEnumConstants(), testGetTypeParameters(),
+	testGetSigners() and testDesiredAssertionStatus()
+	into SimpleScriptContextClassTest.
+
 2013-07-19  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/InvocableClassTest.java:
diff -r ff7b6005f5fb -r 993887993a34 src/org/RhinoTests/CompiledScriptClassTest.java
--- a/src/org/RhinoTests/CompiledScriptClassTest.java	Fri Jul 19 11:55:36 2013 +0200
+++ b/src/org/RhinoTests/CompiledScriptClassTest.java	Mon Jul 22 10:19:45 2013 +0200
@@ -52,6 +52,8 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
 
 import javax.script.Compilable;
 import javax.script.CompiledScript;
diff -r ff7b6005f5fb -r 993887993a34 src/org/RhinoTests/SimpleScriptContextClassTest.java
--- a/src/org/RhinoTests/SimpleScriptContextClassTest.java	Fri Jul 19 11:55:36 2013 +0200
+++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java	Mon Jul 22 10:19:45 2013 +0200
@@ -1295,6 +1295,39 @@
     }
 
     /**
+     * Test for method javax.script.SimpleScriptContext.getClass().getEnumConstants()
+     */
+    protected void testGetEnumConstants() {
+        Object[] enumConstants = this.simpleScriptContextClass.getEnumConstants();
+        assertNull(enumConstants, "getEnumConstants() does not return null");
+    }
+
+    /**
+     * Test for method javax.script.SimpleScriptContext.getClass().getTypeParameters()
+     */
+    protected void testGetTypeParameters() {
+        TypeVariable<?>[] typeParameters = this.simpleScriptContextClass.getTypeParameters();
+        assertNotNull(typeParameters, "getTypeParameters() return null");
+        assertEquals(0, typeParameters.length, "array of wrong size returned by getTypeParameters() " + typeParameters.length);
+    }
+
+    /**
+     * Test for method javax.script.SimpleScriptContext.getClass().getSigners()
+     */
+    protected void testGetSigners() {
+        Object[] signers = this.simpleScriptContextClass.getSigners();
+        assertNull(signers, "getSigners() does not return null");
+    }
+
+    /**
+     * Test for method javax.script.SimpleScriptContext.getClass().desiredAssertionStatus()
+     */
+    protected void testDesiredAssertionStatus() {
+        assertFalse(this.simpleScriptContextClass.desiredAssertionStatus(),
+                "Method SimpleScriptContext.getClass().desiredAssertionStatus() returns wrong value");
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.SimpleScriptContext
      */
     @SuppressWarnings("cast")



More information about the distro-pkg-dev mailing list