/hg/rhino-tests: Added four new tests testGetEnumConstants(), te...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Jul 16 01:56:09 PDT 2013
changeset bf09f2da2f09 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=bf09f2da2f09
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jul 16 10:59:52 2013 +0200
Added four new tests testGetEnumConstants(), testGetTypeParameters(),
testGetSigners() and testDesiredAssertionStatus()
into AbstractScriptEngineClassTest.
diffstat:
ChangeLog | 7 +++
src/org/RhinoTests/AbstractScriptEngineClassTest.java | 36 ++++++++++++++++++-
2 files changed, 42 insertions(+), 1 deletions(-)
diffs (67 lines):
diff -r d1d3441dc622 -r bf09f2da2f09 ChangeLog
--- a/ChangeLog Mon Jul 15 11:55:59 2013 +0200
+++ b/ChangeLog Tue Jul 16 10:59:52 2013 +0200
@@ -1,3 +1,10 @@
+2013-07-16 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/AbstractScriptEngineClassTest.java:
+ Added four new tests testGetEnumConstants(), testGetTypeParameters(),
+ testGetSigners() and testDesiredAssertionStatus()
+ into AbstractScriptEngineClassTest.
+
2013-07-15 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/ScriptExceptionClassTest.java:
diff -r d1d3441dc622 -r bf09f2da2f09 src/org/RhinoTests/AbstractScriptEngineClassTest.java
--- a/src/org/RhinoTests/AbstractScriptEngineClassTest.java Mon Jul 15 11:55:59 2013 +0200
+++ b/src/org/RhinoTests/AbstractScriptEngineClassTest.java Tue Jul 16 10:59:52 2013 +0200
@@ -56,7 +56,8 @@
import java.lang.reflect.TypeVariable;
import javax.script.AbstractScriptEngine;
-import javax.script.ScriptEngineManager;import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+import javax.script.ScriptEngine;
@@ -1287,6 +1288,39 @@
}
/**
+ * Test for method javax.script.AbstractScriptEngine.getClass().getEnumConstants()
+ */
+ protected void testGetEnumConstants() {
+ Object[] enumConstants = this.abstractScriptEngineClass.getEnumConstants();
+ assertNull(enumConstants, "getEnumConstants() does not return null");
+ }
+
+ /**
+ * Test for method javax.script.AbstractScriptEngine.getClass().getTypeParameters()
+ */
+ protected void testGetTypeParameters() {
+ TypeVariable<?>[] typeParameters = this.abstractScriptEngineClass.getTypeParameters();
+ assertNotNull(typeParameters, "getTypeParameters() return null");
+ assertEquals(0, typeParameters.length, "array of wrong size returned by getTypeParameters() " + typeParameters.length);
+ }
+
+ /**
+ * Test for method javax.script.AbstractScriptEngine.getClass().getSigners()
+ */
+ protected void testGetSigners() {
+ Object[] signers = this.abstractScriptEngineClass.getSigners();
+ assertNull(signers, "getSigners() does not return null");
+ }
+
+ /**
+ * Test for method javax.script.AbstractScriptEngine.getClass().desiredAssertionStatus()
+ */
+ protected void testDesiredAssertionStatus() {
+ assertFalse(this.abstractScriptEngineClass.desiredAssertionStatus(),
+ "Method AbstractScriptEngine.getClass().desiredAssertionStatus() returns wrong value");
+ }
+
+ /**
* Test for instanceof operator applied to a class javax.script.AbstractScriptEngine
*/
@SuppressWarnings("cast")
More information about the distro-pkg-dev
mailing list