]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/caltest.h
ICU-511.31.tar.gz
[apple/icu.git] / icuSources / test / intltest / caltest.h
index ee3eb2586b31dd2a2ac2c382288939d7e168613f..97408df5a36813fbe0a3b9c58a5871e6a76484c2 100644 (file)
@@ -1,8 +1,7 @@
-/********************************************************************
- * COPYRIGHT: 
- * Copyright (c) 1997-2003, International Business Machines Corporation and
- * others. All Rights Reserved.
- ********************************************************************/
+/***********************************************************************
+ * Copyright (c) 1997-2012, 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,74 @@ 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);
 };
 
 #endif /* #if !UCONFIG_NO_FORMATTING */