mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-13390 Fixed TestTimeZoneRoundTrip test code issue with Chakma digits.
X-SVN-Rev: 40545
This commit is contained in:
parent
25ee7556dd
commit
2a76f7596a
1 changed files with 7 additions and 8 deletions
|
@ -141,7 +141,8 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
|
|||
Locale("en_CA"),
|
||||
Locale("fr"),
|
||||
Locale("zh_Hant"),
|
||||
Locale("fa")
|
||||
Locale("fa"),
|
||||
Locale("ccp")
|
||||
};
|
||||
|
||||
const Locale *LOCALES;
|
||||
|
@ -170,11 +171,6 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
|
|||
gmtFmt.format(0.0, localGMTString);
|
||||
|
||||
for (int32_t patidx = 0; patidx < UPRV_LENGTHOF(PATTERNS); patidx++) {
|
||||
|
||||
if (uprv_strcmp(LOCALES[locidx].getLanguage(),"ccp")==0 && (PATTERNS[patidx][0]==0x7A || PATTERNS[patidx][0]==0x76) &&
|
||||
logKnownIssue("13390", "Skip handling ccp until TimeZone offset roundtrip is fixed")) {
|
||||
continue;
|
||||
}
|
||||
SimpleDateFormat *sdf = new SimpleDateFormat((UnicodeString)PATTERNS[patidx], LOCALES[locidx], status);
|
||||
if (U_FAILURE(status)) {
|
||||
dataerrln((UnicodeString)"new SimpleDateFormat failed for pattern " +
|
||||
|
@ -305,10 +301,13 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
|
|||
if (!isOffsetFormat) {
|
||||
// Check if localized GMT format is used as a fallback of name styles
|
||||
int32_t numDigits = 0;
|
||||
for (int n = 0; n < tzstr.length(); n++) {
|
||||
if (u_isdigit(tzstr.charAt(n))) {
|
||||
int32_t idx = 0;
|
||||
while (idx < tzstr.length()) {
|
||||
UChar32 cp = tzstr.char32At(idx);
|
||||
if (u_isdigit(cp)) {
|
||||
numDigits++;
|
||||
}
|
||||
idx += U16_LENGTH(cp);
|
||||
}
|
||||
isOffsetFormat = (numDigits > 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue