mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-21527 Assert pattern equality instead of object equality
This commit is contained in:
parent
31871cc14f
commit
f57ef9ebf7
1 changed files with 2 additions and 7 deletions
|
@ -1537,12 +1537,6 @@ public class NumberRegressionTests extends TestFmwk {
|
|||
// trip properly. Test stream in/out integrity too.
|
||||
Locale[] avail = NumberFormat.getAvailableLocales();
|
||||
for (int i=0; i<avail.length; ++i) {
|
||||
if ((avail[i].getLanguage().equals("ji") || avail[i].getLanguage().equals("bm")) &&
|
||||
logKnownIssue(
|
||||
"21527",
|
||||
"Remove bad currency test case in NumberRegressionTests.java")) {
|
||||
continue;
|
||||
}
|
||||
for (int j=0; j<3; ++j) {
|
||||
NumberFormat nf;
|
||||
switch (j) {
|
||||
|
@ -1566,7 +1560,8 @@ public class NumberRegressionTests extends TestFmwk {
|
|||
// Currency does not travel with the pattern string
|
||||
f2.setCurrency(df.getCurrency());
|
||||
}
|
||||
if (!df.equals(f2)) {
|
||||
// ICU-21527: Test the pattern but not the whole DecimalFormat for equality
|
||||
if (!df.toPattern().equals(f2.toPattern())) {
|
||||
errln("FAIL: " + avail[i] + " #" + j + " -> \"" + pat +
|
||||
"\" -> \"" + f2.toPattern() + "\" for case " + j);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue