/hg/rhino-tests: Added three new tests for methods GetCanonicalN...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Wed Jan 9 01:43:53 PST 2013


changeset 90f140ca1129 in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=90f140ca1129
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Jan 09 10:47:01 2013 +0100

	Added three new tests for methods GetCanonicalName(), getAnnotation() and getComponentType() into SimpleBindingsClassTest.java.


diffstat:

 ChangeLog                                       |   6 +++
 src/org/RhinoTests/SimpleBindingsClassTest.java |  43 ++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 1 deletions(-)

diffs (87 lines):

diff -r 7f25cbe3c551 -r 90f140ca1129 ChangeLog
--- a/ChangeLog	Tue Jan 08 10:53:46 2013 +0100
+++ b/ChangeLog	Wed Jan 09 10:47:01 2013 +0100
@@ -1,3 +1,9 @@
+2013-01-09  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/SimpleBindingsClassTest.java:
+	Added three new tests for methods GetCanonicalName(), getAnnotation() and
+	getComponentType().
+
 2013-01-08  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/SimpleScriptContextClassTest.java:
diff -r 7f25cbe3c551 -r 90f140ca1129 src/org/RhinoTests/SimpleBindingsClassTest.java
--- a/src/org/RhinoTests/SimpleBindingsClassTest.java	Tue Jan 08 10:53:46 2013 +0100
+++ b/src/org/RhinoTests/SimpleBindingsClassTest.java	Wed Jan 09 10:47:01 2013 +0100
@@ -1,7 +1,7 @@
 /*
   Rhino test framework
 
-   Copyright (C) 2011, 2012  Red Hat
+   Copyright (C) 2011, 2012, 2013  Red Hat
 
 This file is part of IcedTea.
 
@@ -45,6 +45,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.HashMap;
+import java.util.TreeMap;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
@@ -261,6 +262,15 @@
     }
 
     /**
+     * Test for method javax.script.SimpleBindings.getClass().getCanonicalName()
+     */
+    protected void testGetCanonicalName() {
+        String canonicalName = this.simpleBindingsClass.getCanonicalName();
+        assertEquals(canonicalName, "javax.script.SimpleBindings",
+                "Method javax.script.SimpleBindings.getClass().getCanonicalName() returns wrong value " + canonicalName);
+    }
+
+    /**
      * Test for method javax.script.SimpleBindings.getClass().getSuperclass()
      */
     protected void testGetSuperclass() {
@@ -578,6 +588,37 @@
     }
 
     /**
+     * Test for method javax.script.SimpleBindings.getClass().getAnnotation()
+     */
+    protected void testGetAnnotation() {
+        Annotation annotation;
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.annotation.Annotation.class);
+        assertNull(annotation, "annotation java.lang.annotation.Annotation should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.annotation.Documented.class);
+        assertNull(annotation, "annotation java.lang.annotation.Documented should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.annotation.Inherited.class);
+        assertNull(annotation, "annotation java.lang.annotation.Inherited should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.annotation.Retention.class);
+        assertNull(annotation, "annotation java.lang.annotation.Retention should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.annotation.Target.class);
+        assertNull(annotation, "annotation java.lang.annotation.Target should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.Deprecated.class);
+        assertNull(annotation, "annotation java.lang.Deprecated should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.Override.class);
+        assertNull(annotation, "annotation java.lang.Override should not be returned");
+        annotation = this.simpleBindingsClass.getAnnotation(java.lang.SuppressWarnings.class);
+        assertNull(annotation, "annotation java.lang.SuppressWarnings should not be returned");
+    }
+
+    /**
+     * Test for method javax.script.SimpleBindings.getClass().getComponentType()
+     */
+    protected void testGetComponentType() {
+        Class<?> cls = this.simpleBindingsClass.getComponentType();
+        assertNull(cls, "getComponentType() should returns null");
+    }
+
+    /**
      * Test for instanceof operator applied to a class javax.script.SimpleBindings
      */
     @SuppressWarnings("cast")



More information about the distro-pkg-dev mailing list