]> granicus.if.org Git - icu/commitdiff
ICU-11773 Improve test, fix typo (C)
authorPeter Edberg <pedberg@unicode.org>
Tue, 8 Sep 2015 02:25:24 +0000 (02:25 +0000)
committerPeter Edberg <pedberg@unicode.org>
Tue, 8 Sep 2015 02:25:24 +0000 (02:25 +0000)
X-SVN-Rev: 37900

icu4c/source/i18n/smpdtfmt.cpp
icu4c/source/test/intltest/dtfmttst.cpp

index c971891b04728d6935cbbfa11ad528ce682a43d3..95db904d13e118700a503e8fd671d2d521270050 100644 (file)
@@ -3264,7 +3264,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
             return -start;
         }
     // currently no pattern character is defined for UDAT_TIME_SEPARATOR_FIELD
-    // so we shoul dnot get here. Leave support in for future definition.
+    // so we shoulnot get here. Leave support in for future definition.
     case UDAT_TIME_SEPARATOR_FIELD: //
         {
             static const UChar def_sep = DateFormatSymbols::DEFAULT_TIME_SEPARATOR;
index 7c153246765124f61a3b810bc939275cc1a66bc0..ebcc81a7960016846751601235ca369984a6326e 100644 (file)
@@ -508,7 +508,7 @@ void DateFormatTest::TestFieldPosition() {
 #if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR
     assertTrue("Data", UDAT_FIELD_COUNT == uprv_strlen(PATTERN_CHARS));
 #else
-    // assertTrue("Data", UDAT_FIELD_COUNT == uprv_strlen(PATTERN_CHARS)); // test invalid if no pattern char for UDAT_TIME_SEPARATOR_FIELD
+    assertTrue("Data", UDAT_FIELD_COUNT == uprv_strlen(PATTERN_CHARS) + 1); // +1 for missing TIME_SEPARATOR pattern char
 #endif
 
     // Create test formatters