X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..2be6500137966bba13903b24204a44804f9e133a:/icuSources/test/intltest/dtfmtrtts.cpp diff --git a/icuSources/test/intltest/dtfmtrtts.cpp b/icuSources/test/intltest/dtfmtrtts.cpp index f91218f5..b0ee96a6 100644 --- a/icuSources/test/intltest/dtfmtrtts.cpp +++ b/icuSources/test/intltest/dtfmtrtts.cpp @@ -1,6 +1,6 @@ /*********************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2010, International Business Machines Corporation + * Copyright (c) 1997-2012, International Business Machines Corporation * and others. All Rights Reserved. ***********************************************************************/ @@ -125,6 +125,7 @@ void DateFormatRoundTripTest::TestCentury() } // == + void DateFormatRoundTripTest::TestDateFormatRoundTrip() { UErrorCode status = U_ZERO_ERROR; @@ -434,12 +435,19 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB } } - if(dmatch > maxDmatch || smatch > maxSmatch) { // Special case for Japanese and Islamic (could have large negative years) + /* + * Special case for Japanese and Buddhist (could have large negative years) + * Also, Hebrew calendar need help handling leap month. + */ + if(dmatch > maxDmatch || smatch > maxSmatch) { const char *type = fmt->getCalendar()->getType(); if(!strcmp(type,"japanese") || (!strcmp(type,"buddhist"))) { maxSmatch = 4; maxDmatch = 4; - } + } else if(!strcmp(type,"hebrew")) { + maxSmatch = 3; + maxDmatch = 3; + } } // Use @v to see verbose results on successful cases