harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r611779 - in /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common: org/apache/harmony/luni/tests/java/lang/ref/ org/apache/harmony/luni/tests/java/lang/reflect/ tests/api/java/lang/ref/ tests/api/java/lang/reflect/
Date Mon, 14 Jan 2008 12:00:54 GMT
Author: tellison
Date: Mon Jan 14 04:00:49 2008
New Revision: 611779

URL: http://svn.apache.org/viewvc?rev=611779&view=rev
Log:
Rename packages for lang ref and lang reflect tests, and update a couple of reflection
tests that hard code the expected package name.


Added:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/
      - copied from r611768, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/lang/ref/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/
      - copied from r611768, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/lang/reflect/
Removed:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/lang/ref/
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/lang/reflect/
Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/PhantomReferenceTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceQueueTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/SoftReferenceTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/WeakReferenceTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/AccessibleObjectTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ArrayTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ConstructorTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/FieldTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/InvocationTargetExceptionTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MethodTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ModifierTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ProxyTest.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ReflectPermissionTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/PhantomReferenceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/PhantomReferenceTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/PhantomReferenceTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/PhantomReferenceTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.ref;
+package org.apache.harmony.luni.tests.java.lang.ref;
 
 import java.lang.ref.PhantomReference;
 import java.lang.ref.ReferenceQueue;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceQueueTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceQueueTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceQueueTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceQueueTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.ref;
+package org.apache.harmony.luni.tests.java.lang.ref;
 
 import java.lang.ref.Reference;
 import java.lang.ref.ReferenceQueue;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/ReferenceTest.java
Mon Jan 14 04:00:49 2008
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package tests.api.java.lang.ref;
+package org.apache.harmony.luni.tests.java.lang.ref;
 
 import java.lang.ref.Reference;
 import java.lang.ref.ReferenceQueue;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/SoftReferenceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/SoftReferenceTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/SoftReferenceTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/SoftReferenceTest.java
Mon Jan 14 04:00:49 2008
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package tests.api.java.lang.ref;
+package org.apache.harmony.luni.tests.java.lang.ref;
 
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.SoftReference;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/WeakReferenceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/WeakReferenceTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/WeakReferenceTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ref/WeakReferenceTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.ref;
+package org.apache.harmony.luni.tests.java.lang.ref;
 
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.WeakReference;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/AccessibleObjectTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/AccessibleObjectTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/AccessibleObjectTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/AccessibleObjectTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.AccessibleObject;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ArrayTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ArrayTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ArrayTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ArrayTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.Array;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ConstructorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ConstructorTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ConstructorTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ConstructorTest.java
Mon Jan 14 04:00:49 2008
@@ -15,210 +15,182 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Modifier;
 
 public class ConstructorTest extends junit.framework.TestCase {
 
-	static class ConstructorTestHelper extends Object {
-		int cval;
+    static class ConstructorTestHelper extends Object {
+        int cval;
 
-		public ConstructorTestHelper() throws IndexOutOfBoundsException {
-			cval = 99;
-		}
-
-		public ConstructorTestHelper(Object x) {
-		}
-
-		private ConstructorTestHelper(int a) {
-		}
-
-		protected ConstructorTestHelper(long a) {
-		}
-
-		public int check() {
-			return cval;
-		}
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#equals(java.lang.Object)
-	 */
-	public void test_equalsLjava_lang_Object() throws Exception {
-		// Test for method boolean
-		// java.lang.reflect.Constructor.equals(java.lang.Object)
-		Class[] types = null;
-		Constructor ctor1 = null, ctor2 = null;
-		ctor1 = new ConstructorTestHelper().getClass().getConstructor(
-                                new Class[0]);
-
-                Class[] parms = null;
-                parms = new Class[1];
-                parms[0] = new Object().getClass();
-                ctor2 = new ConstructorTestHelper().getClass()
-                                .getConstructor(parms);
-
-                assertTrue("Different Constructors returned equal", !ctor1.equals(ctor2));
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#getDeclaringClass()
-	 */
-	public void test_getDeclaringClass() throws Exception {
-		// Test for method java.lang.Class
-		// java.lang.reflect.Constructor.getDeclaringClass()
-		boolean val = false;
-                Class pclass = new ConstructorTestHelper().getClass();
-                Constructor ctor = pclass.getConstructor(new Class[0]);
-                val = ctor.getDeclaringClass().equals(pclass);
-
-                assertTrue("Returned incorrect declaring class", val);
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#getExceptionTypes()
-	 */
-	public void test_getExceptionTypes() throws Exception {
-		// Test for method java.lang.Class []
-		// java.lang.reflect.Constructor.getExceptionTypes()
-		Class[] exceptions = null;
-		Class ex = null;
-                Constructor ctor = new ConstructorTestHelper().getClass()
-                                .getConstructor(new Class[0]);
-                exceptions = ctor.getExceptionTypes();
-                ex = new IndexOutOfBoundsException().getClass();
-
-                assertEquals("Returned exception list of incorrect length",
-				1, exceptions.length);
-		assertTrue("Returned incorrect exception", exceptions[0].equals(ex));
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#getModifiers()
-	 */
-	public void test_getModifiers() {
-		// Test for method int java.lang.reflect.Constructor.getModifiers()
-		int mod = 0;
-		try {
-			Constructor ctor = new ConstructorTestHelper().getClass()
-					.getConstructor(new Class[0]);
-			mod = ctor.getModifiers();
-			assertTrue("Returned incorrect modifers for public ctor",
-					((mod & Modifier.PUBLIC) == Modifier.PUBLIC)
-							&& ((mod & Modifier.PRIVATE) == 0));
-		} catch (NoSuchMethodException e) {
-			fail("Exception during test : " + e.getMessage());
-		}
-		try {
-			Class[] cl = { int.class };
-			Constructor ctor = new ConstructorTestHelper().getClass()
-					.getDeclaredConstructor(cl);
-			mod = ctor.getModifiers();
-			assertTrue("Returned incorrect modifers for private ctor",
-					((mod & Modifier.PRIVATE) == Modifier.PRIVATE)
-							&& ((mod & Modifier.PUBLIC) == 0));
-		} catch (NoSuchMethodException e) {
-			fail("Exception during test : " + e.getMessage());
-		}
-		try {
-			Class[] cl = { long.class };
-			Constructor ctor = new ConstructorTestHelper().getClass()
-					.getDeclaredConstructor(cl);
-			mod = ctor.getModifiers();
-			assertTrue("Returned incorrect modifers for private ctor",
-					((mod & Modifier.PROTECTED) == Modifier.PROTECTED)
-							&& ((mod & Modifier.PUBLIC) == 0));
-		} catch (NoSuchMethodException e) {
-			fail("NoSuchMethodException during test : " + e.getMessage());
-		}
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#getName()
-	 */
-	public void test_getName() throws Exception {
-		// Test for method java.lang.String
-		// java.lang.reflect.Constructor.getName()
-                Constructor ctor = new ConstructorTestHelper().getClass()
-                                .getConstructor(new Class[0]);
-                assertTrue(
-                                "Returned incorrect name: " + ctor.getName(),
-                                ctor
-                                                .getName()
-                                                .equals(
-                                                                "tests.api.java.lang.reflect.ConstructorTest$ConstructorTestHelper"));
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#getParameterTypes()
-	 */
-	public void test_getParameterTypes() throws Exception {
-		// Test for method java.lang.Class []
-		// java.lang.reflect.Constructor.getParameterTypes()
-		Class[] types = null;
-                Constructor ctor = new ConstructorTestHelper().getClass()
-                                .getConstructor(new Class[0]);
-                types = ctor.getParameterTypes();
-
-                assertEquals("Incorrect parameter returned", 0, types.length);
-
-		Class[] parms = null;
-                parms = new Class[1];
-                parms[0] = new Object().getClass();
-                ctor = new ConstructorTestHelper().getClass().getConstructor(parms);
-                types = ctor.getParameterTypes();
-
-                assertTrue("Incorrect parameter returned", types[0].equals(parms[0]));
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#newInstance(java.lang.Object[])
-	 */
-	public void test_newInstance$Ljava_lang_Object() throws Exception {
-		// Test for method java.lang.Object
-		// java.lang.reflect.Constructor.newInstance(java.lang.Object [])
-
-		ConstructorTestHelper test = null;
-                Constructor ctor = new ConstructorTestHelper().getClass()
-                                .getConstructor(new Class[0]);
-                test = (ConstructorTestHelper) ctor.newInstance((Object[])null);
-
-                assertEquals("improper instance created", 99, test.check());
-	}
-
-	/**
-	 * @tests java.lang.reflect.Constructor#toString()
-	 */
-	public void test_toString() throws Exception {
-		// Test for method java.lang.String
-		// java.lang.reflect.Constructor.toString()
-		Class[] parms = null;
-		Constructor ctor = null;
-                parms = new Class[1];
-                parms[0] = new Object().getClass();
-                ctor = new ConstructorTestHelper().getClass().getConstructor(parms);
-
-                assertTrue(
-				"Returned incorrect string representation: " + ctor.toString(),
-				ctor
-						.toString()
-						.equals(
-								"public tests.api.java.lang.reflect.ConstructorTest$ConstructorTestHelper(java.lang.Object)"));
-	}
-
-	/**
-	 * Sets up the fixture, for example, open a network connection. This method
-	 * is called before a test is executed.
-	 */
-	protected void setUp() {
-	}
-
-	/**
-	 * Tears down the fixture, for example, close a network connection. This
-	 * method is called after a test is executed.
-	 */
-	protected void tearDown() {
-	}
+        public ConstructorTestHelper() throws IndexOutOfBoundsException {
+            cval = 99;
+        }
+
+        public ConstructorTestHelper(Object x) {
+        }
+
+        private ConstructorTestHelper(int a) {
+        }
+
+        protected ConstructorTestHelper(long a) {
+        }
+
+        public int check() {
+            return cval;
+        }
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#equals(java.lang.Object)
+     */
+    public void test_equalsLjava_lang_Object() throws Exception {
+        Class[] types = null;
+        Constructor ctor1 = null, ctor2 = null;
+        ctor1 = new ConstructorTestHelper().getClass().getConstructor(
+                new Class[0]);
+
+        Class[] parms = null;
+        parms = new Class[1];
+        parms[0] = new Object().getClass();
+        ctor2 = new ConstructorTestHelper().getClass().getConstructor(parms);
+
+        assertTrue("Different Constructors returned equal", !ctor1
+                .equals(ctor2));
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#getDeclaringClass()
+     */
+    public void test_getDeclaringClass() throws Exception {
+        // Test for method java.lang.Class
+        // java.lang.reflect.Constructor.getDeclaringClass()
+        boolean val = false;
+        Class pclass = new ConstructorTestHelper().getClass();
+        Constructor ctor = pclass.getConstructor(new Class[0]);
+        val = ctor.getDeclaringClass().equals(pclass);
+
+        assertTrue("Returned incorrect declaring class", val);
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#getExceptionTypes()
+     */
+    public void test_getExceptionTypes() throws Exception {
+        Class[] exceptions = null;
+        Class ex = null;
+        Constructor ctor = new ConstructorTestHelper().getClass()
+                .getConstructor(new Class[0]);
+        exceptions = ctor.getExceptionTypes();
+        ex = new IndexOutOfBoundsException().getClass();
+
+        assertEquals("Returned exception list of incorrect length", 1,
+                exceptions.length);
+        assertTrue("Returned incorrect exception", exceptions[0].equals(ex));
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#getModifiers()
+     */
+    public void test_getModifiers() {
+        int mod = 0;
+        try {
+            Constructor ctor = new ConstructorTestHelper().getClass()
+                    .getConstructor(new Class[0]);
+            mod = ctor.getModifiers();
+            assertTrue("Returned incorrect modifers for public ctor",
+                    ((mod & Modifier.PUBLIC) == Modifier.PUBLIC)
+                            && ((mod & Modifier.PRIVATE) == 0));
+        } catch (NoSuchMethodException e) {
+            fail("Exception during test : " + e.getMessage());
+        }
+        try {
+            Class[] cl = { int.class };
+            Constructor ctor = new ConstructorTestHelper().getClass()
+                    .getDeclaredConstructor(cl);
+            mod = ctor.getModifiers();
+            assertTrue("Returned incorrect modifers for private ctor",
+                    ((mod & Modifier.PRIVATE) == Modifier.PRIVATE)
+                            && ((mod & Modifier.PUBLIC) == 0));
+        } catch (NoSuchMethodException e) {
+            fail("Exception during test : " + e.getMessage());
+        }
+        try {
+            Class[] cl = { long.class };
+            Constructor ctor = new ConstructorTestHelper().getClass()
+                    .getDeclaredConstructor(cl);
+            mod = ctor.getModifiers();
+            assertTrue("Returned incorrect modifers for private ctor",
+                    ((mod & Modifier.PROTECTED) == Modifier.PROTECTED)
+                            && ((mod & Modifier.PUBLIC) == 0));
+        } catch (NoSuchMethodException e) {
+            fail("NoSuchMethodException during test : " + e.getMessage());
+        }
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#getName()
+     */
+    public void test_getName() throws Exception {
+        Constructor ctor = new ConstructorTestHelper().getClass()
+                .getConstructor(new Class[0]);
+        assertTrue(
+                "Returned incorrect name: " + ctor.getName(),
+                ctor
+                        .getName()
+                        .equals(
+                                "org.apache.harmony.luni.tests.java.lang.reflect.ConstructorTest$ConstructorTestHelper"));
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#getParameterTypes()
+     */
+    public void test_getParameterTypes() throws Exception {
+        Class[] types = null;
+        Constructor ctor = new ConstructorTestHelper().getClass()
+                .getConstructor(new Class[0]);
+        types = ctor.getParameterTypes();
+
+        assertEquals("Incorrect parameter returned", 0, types.length);
+
+        Class[] parms = null;
+        parms = new Class[1];
+        parms[0] = new Object().getClass();
+        ctor = new ConstructorTestHelper().getClass().getConstructor(parms);
+        types = ctor.getParameterTypes();
+
+        assertTrue("Incorrect parameter returned", types[0].equals(parms[0]));
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#newInstance(java.lang.Object[])
+     */
+    public void test_newInstance$Ljava_lang_Object() throws Exception {
+        ConstructorTestHelper test = null;
+        Constructor ctor = new ConstructorTestHelper().getClass()
+                .getConstructor(new Class[0]);
+        test = (ConstructorTestHelper) ctor.newInstance((Object[]) null);
+
+        assertEquals("improper instance created", 99, test.check());
+    }
+
+    /**
+     * @tests java.lang.reflect.Constructor#toString()
+     */
+    public void test_toString() throws Exception {
+        Class[] parms = null;
+        Constructor ctor = null;
+        parms = new Class[1];
+        parms[0] = new Object().getClass();
+        ctor = new ConstructorTestHelper().getClass().getConstructor(parms);
+
+        assertTrue(
+                "Returned incorrect string representation: " + ctor.toString(),
+                ctor
+                        .toString()
+                        .equals(
+                                "public org.apache.harmony.luni.tests.java.lang.reflect.ConstructorTest$ConstructorTestHelper(java.lang.Object)"));
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/FieldTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/FieldTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/FieldTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/FieldTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
@@ -1046,29 +1046,15 @@
 	 * @tests java.lang.reflect.Field#toString()
 	 */
 	public void test_toString() throws Exception {
-		// Test for method java.lang.String java.lang.reflect.Field.toString()
-		Field f = null;
-
-		f = TestField.class.getDeclaredField("x");
+        Field f = null;
 
-                assertEquals("Field returned incorrect string",
-				"private static final int tests.api.java.lang.reflect.FieldTest$TestField.x",
-						f.toString());
-	}
-
-	/**
-	 * Sets up the fixture, for example, open a network connection. This method
-	 * is called before a test is executed.
-	 */
-	protected void setUp() {
-	}
+        f = TestField.class.getDeclaredField("x");
 
-	/**
-	 * Tears down the fixture, for example, close a network connection. This
-	 * method is called after a test is executed.
-	 */
-	protected void tearDown() {
-	}
+        assertEquals(
+                "Field returned incorrect string",
+                "private static final int org.apache.harmony.luni.tests.java.lang.reflect.FieldTest$TestField.x",
+                f.toString());
+    }
 }
 
 class TestAccess {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/InvocationTargetExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/InvocationTargetExceptionTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/InvocationTargetExceptionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/InvocationTargetExceptionTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.io.ByteArrayOutputStream;
 import java.io.CharArrayWriter;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MethodTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MethodTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MethodTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/MethodTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -538,32 +538,17 @@
 	 * @tests java.lang.reflect.Method#toString()
 	 */
 	public void test_toString() throws Exception {
-		// Test for method java.lang.String java.lang.reflect.Method.toString()
-		Method mth = null;
-		Class[] parms = { int.class, short.class, String.class, boolean.class,
-				Object.class, long.class, byte.class, char.class, double.class,
-				float.class };
-		mth = TestMethod.class.getDeclaredMethod("printTest", parms);
-
-		assertTrue(
-				"Returned incorrect string for method: " + mth.toString(),
-				mth
-						.toString()
-						.equals(
-								"public static final void tests.api.java.lang.reflect.MethodTest$TestMethod.printTest(int,short,java.lang.String,boolean,java.lang.Object,long,byte,char,double,float)"));
-	}
-
-	/**
-	 * Sets up the fixture, for example, open a network connection. This method
-	 * is called before a test is executed.
-	 */
-	protected void setUp() {
-	}
-
-	/**
-	 * Tears down the fixture, for example, close a network connection. This
-	 * method is called after a test is executed.
-	 */
-	protected void tearDown() {
-	}
+        Method mth = null;
+        Class[] parms = { int.class, short.class, String.class, boolean.class,
+                Object.class, long.class, byte.class, char.class, double.class,
+                float.class };
+        mth = TestMethod.class.getDeclaredMethod("printTest", parms);
+
+        assertTrue(
+                "Returned incorrect string for method: " + mth.toString(),
+                mth
+                        .toString()
+                        .equals(
+                                "public static final void org.apache.harmony.luni.tests.java.lang.reflect.MethodTest$TestMethod.printTest(int,short,java.lang.String,boolean,java.lang.Object,long,byte,char,double,float)"));
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ModifierTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ModifierTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ModifierTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ModifierTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.Modifier;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ProxyTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ProxyTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ProxyTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ProxyTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ReflectPermissionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ReflectPermissionTest.java?rev=611779&r1=611768&r2=611779&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ReflectPermissionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/reflect/ReflectPermissionTest.java
Mon Jan 14 04:00:49 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.lang.reflect;
+package org.apache.harmony.luni.tests.java.lang.reflect;
 
 import java.lang.reflect.ReflectPermission;
 



Mime
View raw message