| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1997-2010, International Business Machines | 3 * Copyright (c) 1997-2010, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 | 6 |
| 7 #include "unicode/utypes.h" | 7 #include "unicode/utypes.h" |
| 8 | 8 |
| 9 #if !UCONFIG_NO_FORMATTING | 9 #if !UCONFIG_NO_FORMATTING |
| 10 | 10 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 const int32_t EXPECTED_LENGTH = sizeof(EXPECTED)/sizeof(EXPECTED[0]); | 396 const int32_t EXPECTED_LENGTH = sizeof(EXPECTED)/sizeof(EXPECTED[0]); |
| 397 | 397 |
| 398 assertTrue("data size", EXPECTED_LENGTH == COUNT * UDAT_FIELD_COUNT); | 398 assertTrue("data size", EXPECTED_LENGTH == COUNT * UDAT_FIELD_COUNT); |
| 399 | 399 |
| 400 TimeZone* PT = TimeZone::createTimeZone("America/Los_Angeles"); | 400 TimeZone* PT = TimeZone::createTimeZone("America/Los_Angeles"); |
| 401 for (j = 0, exp = 0; j < COUNT; ++j) { | 401 for (j = 0, exp = 0; j < COUNT; ++j) { |
| 402 // String str; | 402 // String str; |
| 403 DateFormat* df = dateFormats[j]; | 403 DateFormat* df = dateFormats[j]; |
| 404 df->setTimeZone(*PT); | 404 df->setTimeZone(*PT); |
| 405 SimpleDateFormat* sdtfmt = dynamic_cast<SimpleDateFormat*>(df); | 405 SimpleDateFormat* sdtfmt = CR_DYNAMIC_CAST<SimpleDateFormat*>(df); |
| 406 if (sdtfmt != NULL) { | 406 if (sdtfmt != NULL) { |
| 407 logln(" Pattern = " + sdtfmt->toPattern(buf.remove())); | 407 logln(" Pattern = " + sdtfmt->toPattern(buf.remove())); |
| 408 } else { | 408 } else { |
| 409 logln(" Pattern = ? (not a SimpleDateFormat)"); | 409 logln(" Pattern = ? (not a SimpleDateFormat)"); |
| 410 } | 410 } |
| 411 logln((UnicodeString)" Result = " + df->format(aug13, buf.remove())); | 411 logln((UnicodeString)" Result = " + df->format(aug13, buf.remove())); |
| 412 | 412 |
| 413 int32_t expBase = exp; // save for later | 413 int32_t expBase = exp; // save for later |
| 414 for (i = 0; i < UDAT_FIELD_COUNT; ++i, ++exp) { | 414 for (i = 0; i < UDAT_FIELD_COUNT; ++i, ++exp) { |
| 415 FieldPosition pos(i); | 415 FieldPosition pos(i); |
| (...skipping 3003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3419 usf->format(thedate,expres,pos); | 3419 usf->format(thedate,expres,pos); |
| 3420 errln((UnicodeString)"FAIL: parsed -> " + parsedres + " expected -> " +
expres); | 3420 errln((UnicodeString)"FAIL: parsed -> " + parsedres + " expected -> " +
expres); |
| 3421 delete usf; | 3421 delete usf; |
| 3422 } | 3422 } |
| 3423 delete sdf; | 3423 delete sdf; |
| 3424 } | 3424 } |
| 3425 | 3425 |
| 3426 #endif /* #if !UCONFIG_NO_FORMATTING */ | 3426 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| 3427 | 3427 |
| 3428 //eof | 3428 //eof |
| OLD | NEW |