| com.ibm.icu.dev.test.TestFmwk com.ibm.icu.dev.test.format.DateFormatTest
Method Summary | |
public void | TestBadInput135() Verify the correct behavior when handling invalid input strings. | public void | TestBadInput135a() Verify the correct behavior when parsing an array of inputs against an
array of patterns, with known results. | public void | TestChineseDateFormatLocalizedPatternChars() | public void | TestCoverage() | public void | TestCzechMonths459() Verify the handling of Czech June and July, which have the unique attribute that
one is a proper prefix substring of the other. | public void | TestDateFormatCalendar() | public void | TestDateFormatZone061() Test the formatting of time zones. | public void | TestDateFormatZone146() Test the formatting of time zones. | public void | TestDayOfYearPattern195() Test the day of year pattern. | public void | TestEquals() | public void | TestEras() | public void | TestExactCountFormat() Test handling of "HHmmss" pattern. | public void | TestFieldPosition() Verify that returned field position indices are correct. | public void | TestGeneral() General parse/format tests. | public void | TestGenericTime() | public void | TestGenericTimeZoneOrder() | public void | TestGreekMay() | public void | TestInvalidPattern() | public void | TestLetterDPattern212() Test the handling of 'D' in patterns. | public void | TestLocaleDateFormat() Test the formatting of dates in different locales. | public void | TestNarrowNames() | public void | TestPartialParse994() Verify that strings which contain incomplete specifications are parsed
correctly. | public void | TestQuotePattern161() Test the handling of single quotes in patterns. | public void | TestRunTogetherPattern917() Verify the behavior of patterns in which digits for different fields run together
without intervening separators. | public void | TestRunTogetherPattern985() Verify the behavior of patterns in which digits for different fields run together
without intervening separators. | public void | TestSpaceParsing() Test DateFormat's parsing of space characters. | public void | TestStandAloneDays() | public void | TestStandAloneMonths() | public void | TestTimeZoneDisplayName() | public void | TestTwoDigitYear() Test the parsing of two-digit years. | public void | TestTwoDigitYearDSTParse() Test the parsing of 2-digit years. | public void | TestWallyWedel() | public void | TestWhiteSpaceParsing() Test handling of white space. | public void | _testIt917(SimpleDateFormat fmt, String str, Date expected) | void | expect(String[] data, Locale loc) Test formatting and parsing. | void | expectFormat(String[] data, Locale loc) Test formatting. | void | expectParse(String[] data, Locale loc) Test parsing. | public static void | main(String[] args) | public void | parse2DigitYear(DateFormat fmt, String str, Date expected) | public void | testErrorChecking() | public void | tryPat994(SimpleDateFormat format, String pat, String str, Date expected) | public void | tryPattern(SimpleDateFormat sdf, Date d, String pattern, Date expected) |
DATEFORMAT_FIELD_NAMES | final static String DATEFORMAT_FIELD_NAMES(Code) | | A list of the names of all the fields in DateFormat.
This MUST be kept in sync with DateFormat.
|
PATTERN_CHARS | final static String PATTERN_CHARS(Code) | | This MUST be kept in sync with DateFormatSymbols.patternChars.
|
TestBadInput135 | public void TestBadInput135()(Code) | | Verify the correct behavior when handling invalid input strings.
|
TestBadInput135a | public void TestBadInput135a()(Code) | | Verify the correct behavior when parsing an array of inputs against an
array of patterns, with known results. The results are encoded after
the input strings in each row.
|
TestChineseDateFormatLocalizedPatternChars | public void TestChineseDateFormatLocalizedPatternChars()(Code) | | |
TestCoverage | public void TestCoverage()(Code) | | |
TestCzechMonths459 | public void TestCzechMonths459()(Code) | | Verify the handling of Czech June and July, which have the unique attribute that
one is a proper prefix substring of the other.
|
TestDateFormatCalendar | public void TestDateFormatCalendar()(Code) | | Test DateFormat(Calendar) API
|
TestDateFormatZone061 | public void TestDateFormatZone061()(Code) | | Test the formatting of time zones.
|
TestDateFormatZone146 | public void TestDateFormatZone146()(Code) | | Test the formatting of time zones.
|
TestDayOfYearPattern195 | public void TestDayOfYearPattern195()(Code) | | Test the day of year pattern.
|
TestEquals | public void TestEquals()(Code) | | |
TestEras | public void TestEras()(Code) | | |
TestExactCountFormat | public void TestExactCountFormat()(Code) | | Test handling of "HHmmss" pattern.
|
TestFieldPosition | public void TestFieldPosition()(Code) | | Verify that returned field position indices are correct.
|
TestGeneral | public void TestGeneral()(Code) | | General parse/format tests. Add test cases as needed.
|
TestGenericTime | public void TestGenericTime()(Code) | | |
TestGenericTimeZoneOrder | public void TestGenericTimeZoneOrder()(Code) | | |
TestGreekMay | public void TestGreekMay()(Code) | | |
TestInvalidPattern | public void TestInvalidPattern()(Code) | | |
TestLetterDPattern212 | public void TestLetterDPattern212()(Code) | | Test the handling of 'D' in patterns.
|
TestLocaleDateFormat | public void TestLocaleDateFormat()(Code) | | Test the formatting of dates in different locales.
|
TestNarrowNames | public void TestNarrowNames()(Code) | | |
TestPartialParse994 | public void TestPartialParse994()(Code) | | Verify that strings which contain incomplete specifications are parsed
correctly. In some instances, this means not being parsed at all, and
returning an appropriate error.
|
TestQuotePattern161 | public void TestQuotePattern161()(Code) | | Test the handling of single quotes in patterns.
|
TestRunTogetherPattern917 | public void TestRunTogetherPattern917()(Code) | | Verify the behavior of patterns in which digits for different fields run together
without intervening separators.
|
TestRunTogetherPattern985 | public void TestRunTogetherPattern985()(Code) | | Verify the behavior of patterns in which digits for different fields run together
without intervening separators.
|
TestSpaceParsing | public void TestSpaceParsing()(Code) | | Test DateFormat's parsing of space characters. See jitterbug 1916.
|
TestStandAloneDays | public void TestStandAloneDays()(Code) | | |
TestStandAloneMonths | public void TestStandAloneMonths()(Code) | | |
TestTimeZoneDisplayName | public void TestTimeZoneDisplayName()(Code) | | |
TestTwoDigitYear | public void TestTwoDigitYear()(Code) | | Test the parsing of two-digit years.
|
TestTwoDigitYearDSTParse | public void TestTwoDigitYearDSTParse()(Code) | | Test the parsing of 2-digit years.
|
TestWallyWedel | public void TestWallyWedel()(Code) | | |
TestWhiteSpaceParsing | public void TestWhiteSpaceParsing()(Code) | | Test handling of white space.
|
expect | void expect(String[] data, Locale loc)(Code) | | Test formatting and parsing. Input is an array of String that starts
with a single 'header' element
[0] = reference dateformat pattern string (ref)
followed by test cases, each of which is 4 or 5 elements:
[i] = test dateformat pattern string (test), or null to reuse prior test pattern
[i+1] = control string, either "fp", "pf", or "F".
[i+2] = data string A
[i+3] = data string B
[i+4] = data string C (not present for 'F' control string)
Note: the number of data strings depends on the control string.
fp formats a date, checks the result, then parses the result and checks against a (possibly different) date
pf parses a string, checks the result, then formats the result and checks against a (possibly different) string
F is a shorthand for fp when the second date is the same as the first
P is a shorthand for pf when the second string is the same as the first
Examples:
(fp) "y/M/d H:mm:ss.SS", "fp", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.56", "2004 03 10 16:36:31.560",
-- ref.parse A, get t0
-- test.format t0, get r0
-- compare r0 to B, fail if not equal
-- test.parse B, get t1
-- ref.parse C, get t2
-- compare t1 and t2, fail if not equal
(F) "y/M/d H:mm:ss.SSS", "F", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567"
-- ref.parse A, get t0
-- test.format t0, get r0
-- compare r0 to B, fail if not equal
-- test.parse B, get t1
-- compare t1 and t0, fail if not equal
(pf) "y/M/d H:mm:ss.SSSS", "pf", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.5670",
-- test.parse A, get t0
-- ref.parse B, get t1
-- compare t0 to t1, fail if not equal
-- test.format t1, get r0
-- compare r0 and C, fail if not equal
(P) "y/M/d H:mm:ss.SSSS", "P", "2004/3/10 16:36:31.5679", "2004 03 10 16:36:31.567"",
-- test.parse A, get t0
-- ref.parse B, get t1
-- compare t0 to t1, fail if not equal
-- test.format t1, get r0
-- compare r0 and A, fail if not equal
|
expectFormat | void expectFormat(String[] data, Locale loc)(Code) | | Test formatting. Input is an array of String that starts
with a single 'header' element
[0] = reference dateformat pattern string (ref)
followed by test cases, each of which is 4 or 5 elements:
[i] = test dateformat pattern string (test), or null to reuse prior test pattern
[i+1] = data string A
[i+2] = data string B
Formats a date, checks the result.
Examples:
"y/M/d H:mm:ss.SSS", "2004 03 10 16:36:31.567", "2004/3/10 16:36:31.567"
-- ref.parse A, get t0
-- test.format t0, get r0
-- compare r0 to B, fail if not equal
|
expectParse | void expectParse(String[] data, Locale loc)(Code) | | Test parsing. Input is an array that starts with the following
header:
[0] = pattern string to parse [i+2] with
followed by test cases, each of which is 3 array elements:
[i] = pattern, or null to reuse prior pattern
[i+1] = input string
[i+2] = expected parse result (parsed with pattern [0])
If expect parse failure, then [i+2] should be null.
|
testErrorChecking | public void testErrorChecking()(Code) | | |
Fields inherited from com.ibm.icu.dev.test.TestFmwk | protected TestParams params(Code)(Java Doc)
|
Methods inherited from com.ibm.icu.dev.test.TestFmwk | protected boolean assertEquals(String message, boolean expected, boolean actual)(Code)(Java Doc) protected boolean assertEquals(String message, long expected, long actual)(Code)(Java Doc) protected boolean assertEquals(String message, float expected, float actual, double error)(Code)(Java Doc) protected boolean assertEquals(String message, double expected, double actual, double error)(Code)(Java Doc) protected boolean assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertFalse(String message, boolean condition)(Code)(Java Doc) protected boolean assertNotEquals(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertNotNull(String message, Object actual)(Code)(Java Doc) protected boolean assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertNull(String message, Object actual)(Code)(Java Doc) protected boolean assertSame(String message, Object expected, Object actual)(Code)(Java Doc) protected boolean assertTrue(String message, boolean condition)(Code)(Java Doc) protected int checkArray(String msg, String array, String expected)(Code)(Java Doc) protected int checkArray(String msg, Locale array, String expected)(Code)(Java Doc) protected int checkArray(String msg, ULocale array, String expected)(Code)(Java Doc) protected Random createRandom()(Code)(Java Doc) protected void fail(String message)(Code)(Java Doc) protected static synchronized java.util.Date getDate(int year, int month, int dom)(Code)(Java Doc) protected String getDescription()(Code)(Java Doc) protected int getErrorCount()(Code)(Java Doc) public PrintWriter getErrorLogPrintWriter()(Code)(Java Doc) public int getInclusion()(Code)(Java Doc) public PrintWriter getLogPrintWriter()(Code)(Java Doc) protected String getMethodDescription(String name)(Code)(Java Doc) protected TestFmwk getSubtest(String prefix) throws TestFmwkException(Code)(Java Doc) protected Target getTargets(String targetName)(Code)(Java Doc) public String getTranslitTestFilter()(Code)(Java Doc) protected void handleException(Throwable e)(Code)(Java Doc) public static String hex(char[] s)(Code)(Java Doc) public static String hex(byte[] s)(Code)(Java Doc) public static String hex(char ch)(Code)(Java Doc) public static String hex(int ch)(Code)(Java Doc) public static String hex(String s)(Code)(Java Doc) public static String hex(StringBuffer s)(Code)(Java Doc) protected void init() throws Exception(Code)(Java Doc) public boolean isDateAtLeast(int year, int month, int day)(Code)(Java Doc) public boolean isMemTracking()(Code)(Java Doc) public boolean isModularBuild()(Code)(Java Doc) public boolean isQuick()(Code)(Java Doc) public boolean isTiming()(Code)(Java Doc) public boolean isVerbose()(Code)(Java Doc) public void msg(String message, int level, boolean incCount, boolean newln)(Code)(Java Doc) public boolean noData()(Code)(Java Doc) public static String prettify(String s)(Code)(Java Doc) public static String prettify(StringBuffer s)(Code)(Java Doc) public Target resolveTarget(TestParams params)(Code)(Java Doc) public Target resolveTarget(TestParams params, String targetPath)(Code)(Java Doc) public void run(String[] args)(Code)(Java Doc) public int run(String[] args, PrintWriter log)(Code)(Java Doc) public int runTests(TestParams params, String[] tests)(Code)(Java Doc) protected TimeZone safeGetTimeZone(String id)(Code)(Java Doc) public void usage()(Code)(Java Doc) public static void usage(PrintWriter pw, String className)(Code)(Java Doc) protected boolean validate()(Code)(Java Doc) protected boolean validateMethod(String name)(Code)(Java Doc)
|
|
|