]> granicus.if.org Git - icu/commitdiff
ICU-10847 Use Arrays.toString(T[]) to format array type data.
authorYoshito Umaoka <y.umaoka@gmail.com>
Thu, 22 May 2014 23:59:16 +0000 (23:59 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Thu, 22 May 2014 23:59:16 +0000 (23:59 +0000)
X-SVN-Rev: 35749

icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/VersionInfoTest.java
icu4j/main/tests/framework/src/com/ibm/icu/dev/test/ResourceModule.java

index 5811a31c988cd2796a0b3e248122c068e6b8a6d2..81a52e9182a015903be6d906568ac957927c866a 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1996-2011, International Business Machines Corporation and    *
+* Copyright (C) 1996-2014, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 */
@@ -71,7 +71,7 @@ public final class VersionInfoTest extends TestFmwk
                 getInstance(INSTANCE_INVALID_INT_[i]);
                 errln("invalid ints should produce an exception");
             } catch (RuntimeException e) {
-                logln("PASS: \"" + INSTANCE_INVALID_INT_[i] + 
+                logln("PASS: \"" + Arrays.toString(INSTANCE_INVALID_INT_[i]) + 
                       "\" failed as expected");
             }
         }
@@ -103,8 +103,8 @@ public final class VersionInfoTest extends TestFmwk
             VersionInfo v1 = getInstance(COMPARE_NOT_EQUAL_INT_[i]);
             VersionInfo v2 = getInstance(COMPARE_NOT_EQUAL_INT_[i + 1]);
             if (v1.compareTo(v2) == 0) {
-                errln(COMPARE_NOT_EQUAL_INT_[i] + " should not equal " +
-                      COMPARE_NOT_EQUAL_INT_[i + 1]);
+                errln(Arrays.toString(COMPARE_NOT_EQUAL_INT_[i]) + " should not equal " +
+                      Arrays.toString(COMPARE_NOT_EQUAL_INT_[i + 1]));
             }
         }
         for (int i = 0; i < COMPARE_EQUAL_STRING_.length - 1; i ++) {
index 7eb41c8f8401b4d76ef83b57c419d513e6572f38..26ecfebbe61063f9095395123ce4a661e33cb7bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  **********************************************************************
- * Copyright (c) 2006-2009, International Business Machines
+ * Copyright (c) 2006-2014, International Business Machines
  * Corporation and others.  All Rights Reserved.
  **********************************************************************
  * Created on 2006-4-21
@@ -238,7 +238,8 @@ class ResourceModule implements TestDataModule {
         if (Arrays.binarySearch(expResTypes, type) >= 0) {
             return t;
         } else {
-            throw new DataModuleFormatError(new UResourceTypeMismatchException("Actual type " + t.getType() + " != expected types " + expResTypes + "."));
+            throw new DataModuleFormatError(new UResourceTypeMismatchException("Actual type " + t.getType()
+                    + " != expected types " + Arrays.toString(expResTypes) + "."));
         }
     }