/hg/rhino-tests: Four new tests added into the BindingsClassTest...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Feb 7 01:45:59 PST 2013


changeset eef395e6c01d in /hg/rhino-tests
details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=eef395e6c01d
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Feb 07 10:48:59 2013 +0100

	Four new tests added into the BindingsClassTest test suite:
	testGetComponentType, testGetClasses, testGetDeclaredClasses and
	testGetDeclaringClass.


diffstat:

 ChangeLog                                 |   7 ++++++
 src/org/RhinoTests/BindingsClassTest.java |  34 +++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 0 deletions(-)

diffs (58 lines):

diff -r a9f65433ce81 -r eef395e6c01d ChangeLog
--- a/ChangeLog	Wed Feb 06 10:29:46 2013 +0100
+++ b/ChangeLog	Thu Feb 07 10:48:59 2013 +0100
@@ -1,3 +1,10 @@
+2013-02-07  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/RhinoTests/BindingsClassTest.java:
+	Four new tests added into the BindingsClassTest test suite:
+	testGetComponentType, testGetClasses, testGetDeclaredClasses and
+	testGetDeclaringClass.
+
 2013-02-06  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/RhinoTests/InvocableClassTest.java:
diff -r a9f65433ce81 -r eef395e6c01d src/org/RhinoTests/BindingsClassTest.java
--- a/src/org/RhinoTests/BindingsClassTest.java	Wed Feb 06 10:29:46 2013 +0100
+++ b/src/org/RhinoTests/BindingsClassTest.java	Thu Feb 07 10:48:59 2013 +0100
@@ -762,6 +762,40 @@
     }
 
     /**
+     * Test for method javax.script.Bindings.getClass().getComponentType()
+     */
+    protected void testGetComponentType() {
+        Class<?> cls = this.bindingsClass.getComponentType();
+        assertNull(cls, "getComponentType() should returns null");
+    }
+
+    /**
+     * Test for method javax.script.Bindings.getClass().getClasses()
+     */
+    protected void testGetClasses() {
+        Class<?>[] cls = this.bindingsClass.getClasses();
+        assertNotNull(cls, "getClasses() returns null");
+        assertEquals(cls.length, 0, "getClasses() returns wrong value!");
+    }
+
+    /**
+     * Test for method javax.script.Bindings.getClass().getDeclaredClasses()
+     */
+    protected void testGetDeclaredClasses() {
+        Class<?>[] cls = this.bindingsClass.getDeclaredClasses();
+        assertNotNull(cls, "getDeclaredClasses() returns null");
+        assertEquals(cls.length, 0, "getDeclaredClasses() returns wrong value!");
+    }
+
+    /**
+     * Test for method javax.script.Bindings.getClass().getDeclaringClass()
+     */
+    protected void testGetDeclaringClass() {
+        Class<?> cls = this.bindingsClass.getDeclaringClass();
+        assertNull(cls, "getDeclaringClass() does not return null");
+    }
+
+    /**
      * Test for method javax.script.Bindings.getClass().getEnclosingClass()
      */
     protected void testGetEnclosingClass() {



More information about the distro-pkg-dev mailing list