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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Wed Jul 17 01:55:48 PDT 2013


changeset 7447f9e8eb91 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=7447f9e8eb91
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Jul 17 10:59:30 2013 +0200

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


diffstat:

 ChangeLog                                   |   7 +++++
 src/org/RhinoTests/CompilableClassTest.java |  35 +++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 0 deletions(-)

diffs (67 lines):

diff -r bf09f2da2f09 -r 7447f9e8eb91 ChangeLog
--- a/ChangeLog	Tue Jul 16 10:59:52 2013 +0200
+++ b/ChangeLog	Wed Jul 17 10:59:30 2013 +0200
@@ -1,3 +1,10 @@
+2013-07-17  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/CompilableClassTest.java:
+	Added four new tests testGetEnumConstants(), testGetTypeParameters(),
+	testGetSigners() and testDesiredAssertionStatus()
+	into CompilableClassTest.
+
 2013-07-16  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/AbstractScriptEngineClassTest.java:
diff -r bf09f2da2f09 -r 7447f9e8eb91 src/org/RhinoTests/CompilableClassTest.java
--- a/src/org/RhinoTests/CompilableClassTest.java	Tue Jul 16 10:59:52 2013 +0200
+++ b/src/org/RhinoTests/CompilableClassTest.java	Wed Jul 17 10:59:30 2013 +0200
@@ -56,7 +56,9 @@
 import java.lang.reflect.TypeVariable;
 
 import javax.script.Compilable;
+import javax.script.Invocable;
 import javax.script.ScriptEngineManager;
+import javax.script.ScriptEngine;
 
 
 
@@ -1013,6 +1015,39 @@
     }
 
     /**
+     * Test for method javax.script.Compilable.getClass().getEnumConstants()
+     */
+    protected void testGetEnumConstants() {
+        Object[] enumConstants = this.compilableClass.getEnumConstants();
+        assertNull(enumConstants, "getEnumConstants() does not return null");
+    }
+
+    /**
+     * Test for method javax.script.Compilable.getClass().getTypeParameters()
+     */
+    protected void testGetTypeParameters() {
+        TypeVariable<?>[] typeParameters = this.compilableClass.getTypeParameters();
+        assertNotNull(typeParameters, "getTypeParameters() return null");
+        assertEquals(0, typeParameters.length, "array of wrong size returned by getTypeParameters() " + typeParameters.length);
+    }
+
+    /**
+     * Test for method javax.script.Compilable.getClass().getSigners()
+     */
+    protected void testGetSigners() {
+        Object[] signers = this.compilableClass.getSigners();
+        assertNull(signers, "getSigners() does not return null");
+    }
+
+    /**
+     * Test for method javax.script.Compilable.getClass().desiredAssertionStatus()
+     */
+    protected void testDesiredAssertionStatus() {
+        assertFalse(this.compilableClass.desiredAssertionStatus(),
+                "Method Compilable.getClass().desiredAssertionStatus() returns wrong value");
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.Compilable
      */
     @SuppressWarnings("cast")



More information about the distro-pkg-dev mailing list