commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r754487 - in /commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect: ConstructorUtilsTest.java MethodUtilsTest.java
Date Sat, 14 Mar 2009 16:38:50 GMT
Author: sebb
Date: Sat Mar 14 16:38:50 2009
New Revision: 754487

URL: http://svn.apache.org/viewvc?rev=754487&view=rev
Log:
Copy test fixes from trunk

Modified:
    commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
    commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java

Modified: commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java?rev=754487&r1=754486&r2=754487&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
(original)
+++ commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
Sat Mar 14 16:38:50 2009
@@ -212,11 +212,15 @@
             Class[] requestTypes, Class[] actualTypes) {
         Constructor c = ConstructorUtils.getMatchingAccessibleConstructor(cls,
                 requestTypes);
-        assertTrue(Arrays.toString(c.getParameterTypes()) + " not equals "
-                + Arrays.toString(actualTypes), Arrays.equals(actualTypes, c
+        assertTrue(toString(c.getParameterTypes()) + " not equals "
+                + toString(actualTypes), Arrays.equals(actualTypes, c
                 .getParameterTypes()));
     }
 
+    private String toString(Class[] c) {
+        return Arrays.asList(c).toString();
+    }
+
     private Class[] singletonArray(Class c) {
         Class[] result = (Class[]) classCache.get(c);
         if (result == null) {

Modified: commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java?rev=754487&r1=754486&r2=754487&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java
(original)
+++ commons/proper/lang/branches/LANG_POST_2_4/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java
Sat Mar 14 16:38:50 2009
@@ -313,11 +313,15 @@
             String methodName, Class[] requestTypes, Class[] actualTypes) {
         Method m = MethodUtils.getMatchingAccessibleMethod(cls, methodName,
                 requestTypes);
-        assertTrue(Arrays.toString(m.getParameterTypes()) + " not equals "
-                + Arrays.toString(actualTypes), Arrays.equals(actualTypes, m
+        assertTrue(toString(m.getParameterTypes()) + " not equals "
+                + toString(actualTypes), Arrays.equals(actualTypes, m
                 .getParameterTypes()));
     }
 
+    private String toString(Class[] c) {
+        return Arrays.asList(c).toString();
+    }
+
     public void testSetCacheMethods() throws Exception {
         MethodUtils.clearCache();
         MethodUtils.setCacheMethods(true);



Mime
View raw message