ICU-10847 Use Arrays.toString(T[]) to format array type data.

X-SVN-Rev: 35749
This commit is contained in:
Yoshito Umaoka 2014-05-22 23:59:16 +00:00
parent df067d53b2
commit f129a97e32
2 changed files with 7 additions and 6 deletions

View 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 ++) {

View 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) + "."));
}
}