/hg/rhino-tests: Added five new tests to the test suite
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Oct 2 01:56:26 PDT 2012
changeset fc600356b864 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=fc600356b864
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Oct 02 10:59:08 2012 +0200
Added five new tests to the test suite
src/org/RhinoTests/SimpleScriptContextClassTest.java.
diffstat:
ChangeLog | 5 +
src/org/RhinoTests/SimpleScriptContextClassTest.java | 64 ++++++++++++++++++-
2 files changed, 64 insertions(+), 5 deletions(-)
diffs (117 lines):
diff -r 581f4fa2e76f -r fc600356b864 ChangeLog
--- a/ChangeLog Mon Oct 01 10:43:13 2012 +0200
+++ b/ChangeLog Tue Oct 02 10:59:08 2012 +0200
@@ -1,3 +1,8 @@
+2012-10-02 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/RhinoTests/SimpleScriptContextClassTest.java:
+ Added five new tests to this test suite.
+
2012-10-01 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/RhinoTests/ScriptExceptionClassTest.java:
diff -r 581f4fa2e76f -r fc600356b864 src/org/RhinoTests/SimpleScriptContextClassTest.java
--- a/src/org/RhinoTests/SimpleScriptContextClassTest.java Mon Oct 01 10:43:13 2012 +0200
+++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java Tue Oct 02 10:59:08 2012 +0200
@@ -70,7 +70,7 @@
/**
* Object that represents the type of one SimpleScriptContext instance.
*/
- Class simpleScriptContextClass = null;
+ Class<?> simpleScriptContextClass = null;
@Override
protected void setUp(String[] args) {
@@ -142,10 +142,64 @@
}
/**
+ * Test for method javax.script.SimpleScriptContext.getClass().isAnnotation()
+ */
+ protected void testIsAnnotation() {
+ assertFalse(this.simpleScriptContextClass.isAnnotation(),
+ "Method SimpleScriptContext.getClass().isAnnotation() returns wrong value");
+ }
+
+ /**
+ * Test for method javax.script.SimpleScriptContext.getClass().isAnnotationPresent()
+ */
+ protected void testIsAnnotationPresent() {
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Annotation.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Documented.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Inherited.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Retention.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Target.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.Deprecated.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.Override.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value");
+ assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.SuppressWarnings.class),
+ "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value");
+ }
+
+ /**
+ * Test for method javax.script.SimpleScriptContext.getClass().isAnonymousClass()
+ */
+ protected void testIsAnonymousClass() {
+ assertFalse(this.simpleScriptContextClass.isAnonymousClass(),
+ "Method SimpleScriptContext.getClass().isAnonymousClass() returns wrong value");
+ }
+
+ /**
+ * Test for method javax.script.SimpleScriptContext.getClass().isArray()
+ */
+ protected void testIsArray() {
+ assertFalse(this.simpleScriptContextClass.isArray(),
+ "Method SimpleScriptContext.getClass().isArray() returns wrong value");
+ }
+
+ /**
+ * Test for method javax.script.SimpleScriptContext.getClass().isEnum()
+ */
+ protected void testIsEnum() {
+ assertFalse(this.simpleScriptContextClass.isEnum(),
+ "Method SimpleScriptContext.getClass().isEnum() returns wrong value");
+ }
+
+ /**
* Test for method javax.script.SimpleScriptContext.getClass().getInterfaces()
*/
protected void testGetInterfaces() {
- List interfaces = Arrays.asList(this.simpleScriptContextClass.getInterfaces());
+ List<Class<?>> interfaces = Arrays.asList(this.simpleScriptContextClass.getInterfaces());
assertTrue(interfaces.contains(ScriptContext.class),
"list of implemented interfaces does not contain ScriptContext");
}
@@ -213,7 +267,7 @@
* Test for method javax.script.SimpleScriptContext.getClass().getSuperclass()
*/
protected void testGetSuperclass() {
- Class superClass = this.simpleScriptContextClass.getSuperclass();
+ Class<?> superClass = this.simpleScriptContextClass.getSuperclass();
String superClassName = superClass.getName();
assertEquals(superClassName, "java.lang.Object",
"Method SimpleScriptContext.getClass().getSuperclass() returns wrong value " + superClassName);
@@ -223,7 +277,7 @@
* Test for method javax.script.SimpleScriptContext.getClass().getConstructors()
*/
protected void testGetConstructors() {
- Constructor[] constructors = this.simpleScriptContextClass.getConstructors();
+ Constructor<?>[] constructors = this.simpleScriptContextClass.getConstructors();
assertEquals(constructors.length, 1, "only one constructor should be set");
String constructorName;
String constructorString;
@@ -239,7 +293,7 @@
* Test for method javax.script.SimpleScriptContext.getClass().getDeclaredConstructors()
*/
protected void testGetDeclaredConstructors() {
- Constructor[] constructors = this.simpleScriptContextClass.getDeclaredConstructors();
+ Constructor<?>[] constructors = this.simpleScriptContextClass.getDeclaredConstructors();
assertEquals(constructors.length, 1, "only one constructor should be set");
String constructorName;
String constructorString;
More information about the distro-pkg-dev
mailing list