X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..efa1e6592fb03ce23b15276b2b91d885a3ee7da5:/icuSources/test/intltest/caltest.h diff --git a/icuSources/test/intltest/caltest.h b/icuSources/test/intltest/caltest.h index ee3eb258..09c28964 100644 --- a/icuSources/test/intltest/caltest.h +++ b/icuSources/test/intltest/caltest.h @@ -1,8 +1,7 @@ -/******************************************************************** - * COPYRIGHT: - * Copyright (c) 1997-2003, International Business Machines Corporation and - * others. All Rights Reserved. - ********************************************************************/ +/*********************************************************************** + * Copyright (c) 1997-2014, International Business Machines Corporation + * and others. All Rights Reserved. + ***********************************************************************/ #ifndef __CalendarTest__ #define __CalendarTest__ @@ -52,6 +51,8 @@ public: virtual void TestGenericAPI(void); // New to C++ -- needs to be back ported to Java virtual void TestWOY(void); + + virtual void TestDebug(void); public: // package /** @@ -168,11 +169,76 @@ public: int times, UCalendarDateFields field, UCalendarDateFields field2, UErrorCode& errorCode); + void TestYWOY(void); + void TestJD(void); + void yearAddTest(Calendar& cal, UErrorCode& status); public: // package // test subroutine use by TestDOWProgression virtual void marchByDelta(Calendar* cal, int32_t delta); + + public: + // for other tests' use + static UnicodeString fieldName(UCalendarDateFields f); + static UnicodeString calToStr(const Calendar & cal); + + // List of non-installed locales with interesting calendars + + /** + * @return the count of 'other' locales to test + */ + static int32_t testLocaleCount(); + + /** + * @param i index of 'other' locale to return + * @return locale ID + */ + static const char* testLocaleID(int32_t i); + + /** + * Clone the specified calendar, and determine its earliest supported date + * by setting the extended year to the minimum value. + * @param cal Calendar (will be cloned) + * @param isGregorian output: returns 'TRUE' if the calendar's class is GregorianCalendar + * @param status error code + */ + static UDate minDateOfCalendar(const Calendar& cal, UBool &isGregorian, UErrorCode& status); + + /** + * Construct a calendar of the specified locale, and determine its earliest supported date + * by setting the extended year to the minimum value. + * @param locale locale of calendar to check + * @param isGregorian output: returns 'TRUE' if the calendar's class is GregorianCalendar + * @param status error code + */ + static UDate minDateOfCalendar(const Locale& locale, UBool &isGregorian, UErrorCode& status); + + // internal - for other test use + public: + void Test6703(void); + void Test3785(void); + void Test1624(void); + + /** + * Test the time stamp array recalculation during heavy Calendar usage + */ + void TestTimeStamp(void); + /** + * Test the ISO8601 calendar type + */ + void TestISO8601(void); + + /** + * Test cases for [set|get][Repeated|Skipped]WallTimeOption + */ + void TestAmbiguousWallTimeAPIs(void); + void TestRepeatedWallTime(void); + void TestSkippedWallTime(void); + + void TestCloneLocale(void); + + void TestAddAcrossZoneTransition(void); }; #endif /* #if !UCONFIG_NO_FORMATTING */