ICU-511.25.tar.gz
[apple/icu.git] / icuSources / test / intltest / dtfmttst.h
index e08ff6834cd045fe392f6d112488052e7d1c6553..829903fabe07529a0f0b554b99f83761110df308 100644 (file)
@@ -1,6 +1,6 @@
 /********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1997-2006, International Business Machines Corporation and
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
 #include "caltztst.h"
 
 /** 
- * Performs many different tests for DataeFormat and SimpleDateFormat
+ * Performs many different tests for DateFormat and SimpleDateFormat
  **/
 class DateFormatTest: public CalendarTimeZoneTest {
     // IntlTest override
     void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par );
 public:
+    /**
+     * Verify that patterns have the correct values and could produce
+     * the DateFormat instances that contain the correct localized patterns.
+     */
+    void TestPatterns();
     /**
      *  "Test written by Wally Wedel and emailed to me."
      *  Test handling of timezone offsets
@@ -109,10 +114,6 @@ public:
      */
     virtual void TestBadInput135(void);
  
-private:
-    static const char* parseFormats[];
-    static const char* inputStrings[];
 public:
     /**
      * Verify the correct behavior when parsing an array of inputs against an
@@ -140,7 +141,9 @@ public:
     virtual void TestDateFormatZone146(void);
 
     void TestTimeZoneStringsAPI(void);
+
+    void TestGMTParsing(void);
+
 public: // package
     /**
      * Test the formatting of dates in different locales.
@@ -163,6 +166,26 @@ public: // package
 
     void TestGenericTimeZoneOrder(void);
 
+    void Test6338(void);
+
+    void Test6726(void);
+
+    void Test6880(void);
+
+    void TestISOEra(void);
+
+    void TestFormalChineseDate(void);
+
+    void TestStandAloneGMTParse(void);
+
+    void TestParsePosition(void);
+
+    void TestMonthPatterns(void);
+
+    void TestContext(void);
+
+    void TestNonGregoFmtParse(void);
+
 public:
     /**
      * Test host-specific formatting.
@@ -171,17 +194,53 @@ public:
 
 public:
     /**
-     * Test patterns added in CLDR 1.4
+     * Test patterns added in CLDR 1.4, CLDR 23
      */
     void TestEras(void);
 
     void TestNarrowNames(void);
 
+    void TestShortDays(void);
+
     void TestStandAloneDays(void);
 
     void TestStandAloneMonths(void);
 
     void TestQuarters(void);
+    
+    void TestZTimeZoneParsing(void);
+
+    void TestRelativeClone(void);
+    
+    void TestHostClone(void);
+
+    void TestTimeZoneDisplayName(void);
+
+    void TestRoundtripWithCalendar(void);
+
+public:
+    /***
+     * Test Relative Dates
+     */
+     void TestRelative(void);
+/*   void TestRelativeError(void);
+     void TestRelativeOther(void);
+*/
+
+    void TestDotAndAtLeniency();
+private:
+    UBool showParse(DateFormat &format, const UnicodeString &formattedString);
+
+public:
+    /**
+     * Test parsing a number as a string
+     */
+    void TestNumberAsStringParsing(void);
+
+ private:
+      void TestRelative(int daysdelta, 
+                                  const Locale& loc,
+                                  const char *expectChars);
 
  private:
     void expectParse(const char** data, int32_t data_length,