mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-13574 Adding copy and resource bundle tests to ICU4J (added to ICU4C in previous commit).
X-SVN-Rev: 40864
This commit is contained in:
parent
4eff55cc31
commit
baca9ac330
1 changed files with 30 additions and 0 deletions
|
@ -311,6 +311,36 @@ public class IntlTestDecimalFormatSymbols extends TestFmwk
|
|||
errln("ERROR: Char digits should be Latin digits");
|
||||
}
|
||||
|
||||
// Check on copy
|
||||
DecimalFormatSymbols copy = (DecimalFormatSymbols) symbols.clone();
|
||||
if (!Arrays.equals(copy.getDigitStrings(), osmanyaDigitStrings)) {
|
||||
errln("ERROR: Osmanya digits (supplementary) should be set");
|
||||
}
|
||||
if (Character.codePointAt(osmanyaDigitStrings[0], 0) != copy.getCodePointZero()) {
|
||||
errln("ERROR: Code point zero be Osmanya code point zero");
|
||||
}
|
||||
if (defZero != copy.getZeroDigit()) {
|
||||
errln("ERROR: Zero digit should be 0");
|
||||
}
|
||||
if (!Arrays.equals(copy.getDigits(), defDigits)) {
|
||||
errln("ERROR: Char digits should be Latin digits");
|
||||
}
|
||||
|
||||
// Check on resource bundle
|
||||
DecimalFormatSymbols fromData = DecimalFormatSymbols.getInstance(new ULocale("en@numbers=osma"));
|
||||
if (!Arrays.equals(fromData.getDigitStrings(), osmanyaDigitStrings)) {
|
||||
errln("ERROR: Osmanya digits (supplementary) should be set");
|
||||
}
|
||||
if (Character.codePointAt(osmanyaDigitStrings[0], 0) != fromData.getCodePointZero()) {
|
||||
errln("ERROR: Code point zero be Osmanya code point zero");
|
||||
}
|
||||
if (defZero != fromData.getZeroDigit()) {
|
||||
errln("ERROR: Zero digit should be 0");
|
||||
}
|
||||
if (!Arrays.equals(fromData.getDigits(), defDigits)) {
|
||||
errln("ERROR: Char digits should be Latin digits");
|
||||
}
|
||||
|
||||
symbols.setDigitStrings(differentDigitStrings);
|
||||
if (!Arrays.equals(symbols.getDigitStrings(), differentDigitStrings)) {
|
||||
errln("ERROR: Different digits should be set");
|
||||
|
|
Loading…
Add table
Reference in a new issue