/********************************************************************
* 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
*/
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
virtual void TestDateFormatZone146(void);
void TestTimeZoneStringsAPI(void);
-
+
+ void TestGMTParsing(void);
+
public: // package
/**
* Test the formatting of dates in different locales.
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.
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,