]> granicus.if.org Git - icu/commitdiff
ICU-8268 toString on array doesn't produce anything useful. Use Arrays.toString.
authorAbhinav Gupta <mail@abhinavg.net>
Wed, 28 Sep 2011 14:46:11 +0000 (14:46 +0000)
committerAbhinav Gupta <mail@abhinavg.net>
Wed, 28 Sep 2011 14:46:11 +0000 (14:46 +0000)
X-SVN-Rev: 30730

icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterTest.java
icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/VersionInfoTest.java

index 473f854c6bf1370c6888cd30005643d838d47b59..3f3a8cdcdd6a07f54c17e49738b1380fe9c2b211 100644 (file)
@@ -2996,7 +2996,7 @@ public final class UCharacterTest extends TestFmwk
                 UCharacter.codePointAt(reg_text, 100, limitCases[i]);
                 errln("UCharacter.codePointAt was suppose to return an exception " +
                         "but got " + UCharacter.codePointAt(reg_text, 100, limitCases[i]) +
-                        ". The following passed parameters were Text: " + reg_text.toString() + ", Start: " + 
+                        ". The following passed parameters were Text: " + Arrays.toString(reg_text) + ", Start: " +
                         100 + ", Limit: " + limitCases[i] + ".");
             } catch(Exception e){
             }
@@ -3008,7 +3008,7 @@ public final class UCharacterTest extends TestFmwk
                 UCharacter.codePointAt(empty_text, 0, limitCases[i]);
                 errln("UCharacter.codePointAt was suppose to return an exception " +
                         "but got " + UCharacter.codePointAt(empty_text, 0, limitCases[i]) +
-                        ". The following passed parameters were Text: " + empty_text.toString() + ", Start: " + 
+                        ". The following passed parameters were Text: " + Arrays.toString(empty_text) + ", Start: " +
                         0 + ", Limit: " + limitCases[i] + ".");
             } catch(Exception e){
             }
@@ -3017,7 +3017,7 @@ public final class UCharacterTest extends TestFmwk
                 UCharacter.codePointCount(one_char_text, 0, limitCases[i]);
                 errln("UCharacter.codePointCount was suppose to return an exception " +
                         "but got " + UCharacter.codePointCount(one_char_text, 0, limitCases[i]) +
-                        ". The following passed parameters were Text: " + one_char_text.toString() + ", Start: " + 
+                        ". The following passed parameters were Text: " + Arrays.toString(one_char_text) + ", Start: " +
                         0 + ", Limit: " + limitCases[i] + ".");
             } catch(Exception e){
             }
@@ -3181,7 +3181,7 @@ public final class UCharacterTest extends TestFmwk
                 UCharacter.codePointCount(reg_text, 100, limitCases[i]);
                 errln("UCharacter.codePointCount was suppose to return an exception " +
                         "but got " + UCharacter.codePointCount(reg_text, 100, limitCases[i]) +
-                        ". The following passed parameters were Text: " + reg_text.toString() + ", Start: " + 
+                        ". The following passed parameters were Text: " + Arrays.toString(reg_text) + ", Start: " +
                         100 + ", Limit: " + limitCases[i] + ".");
             } catch(Exception e){
             }
@@ -3193,7 +3193,7 @@ public final class UCharacterTest extends TestFmwk
                 UCharacter.codePointCount(empty_text, 0, limitCases[i]);
                 errln("UCharacter.codePointCount was suppose to return an exception " +
                         "but got " + UCharacter.codePointCount(empty_text, 0, limitCases[i]) +
-                        ". The following passed parameters were Text: " + empty_text.toString() + ", Start: " + 
+                        ". The following passed parameters were Text: " + Arrays.toString(empty_text) + ", Start: " +
                         0 + ", Limit: " + limitCases[i] + ".");
             } catch(Exception e){
             }
@@ -3202,7 +3202,7 @@ public final class UCharacterTest extends TestFmwk
                 UCharacter.codePointCount(one_char_text, 0, limitCases[i]);
                 errln("UCharacter.codePointCount was suppose to return an exception " +
                         "but got " + UCharacter.codePointCount(one_char_text, 0, limitCases[i]) +
-                        ". The following passed parameters were Text: " + one_char_text.toString() + ", Start: " + 
+                        ". The following passed parameters were Text: " + Arrays.toString(one_char_text) + ", Start: " +
                         0 + ", Limit: " + limitCases[i] + ".");
             } catch(Exception e){
             }
index 4bd8a51d9f034187db220bc6e3d566874192213e..5811a31c988cd2796a0b3e248122c068e6b8a6d2 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *******************************************************************************
-* Copyright (C) 1996-2010, International Business Machines Corporation and    *
+* Copyright (C) 1996-2011, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 */
@@ -9,6 +9,8 @@
 package com.ibm.icu.dev.test.util;
 
 
+import java.util.Arrays;
+
 import com.ibm.icu.dev.test.TestFmwk;
 import com.ibm.icu.util.VersionInfo;
 
@@ -119,8 +121,8 @@ public final class VersionInfoTest extends TestFmwk
             VersionInfo v1 = getInstance(COMPARE_EQUAL_INT_[i]);
             VersionInfo v2 = getInstance(COMPARE_EQUAL_INT_[i + 1]);
             if (v1.compareTo(v2) != 0) {
-                errln(COMPARE_EQUAL_INT_[i] + " should equal " +
-                      COMPARE_EQUAL_INT_[i + 1]);
+                errln(Arrays.toString(COMPARE_EQUAL_INT_[i]) + " should equal " +
+                        Arrays.toString(COMPARE_EQUAL_INT_[i + 1]));
             }
         }
         for (int i = 0; i < COMPARE_LESS_.length - 1; i ++) {
@@ -181,7 +183,7 @@ public final class VersionInfoTest extends TestFmwk
             }
             v = getInstance(TOSTRING_INT_[i]);
             if (!v.toString().equals(TOSTRING_RESULT_[i])) {
-                errln("toString() for " + TOSTRING_INT_[i] + 
+                errln("toString() for " + Arrays.toString(TOSTRING_INT_[i]) +
                       " should produce " + TOSTRING_RESULT_[i]);
             }
         }