]> granicus.if.org Git - icu/commitdiff
ICU-9836 C/Java mismatch parsing years with pattern "yyyy" :: fix new test under...
authorScott Russell <DTownSMR@gmail.com>
Sat, 5 Jan 2013 23:43:54 +0000 (23:43 +0000)
committerScott Russell <DTownSMR@gmail.com>
Sat, 5 Jan 2013 23:43:54 +0000 (23:43 +0000)
X-SVN-Rev: 33016

icu4c/source/test/cintltst/cdattst.c

index 71d937a289dfb0aaf9f81b17f314c4a09e4131b9..980df11da550f8f3a018bc28208ab9cdf943b514 100644 (file)
@@ -899,9 +899,13 @@ static void TestCalendarDateParse() {
     UCalendar* tempCal = 0;
     UCalendar* calendar = 0;
 
-    static const UChar pattern[5] = "yyyy";
-    static const UChar pattern2[3] = "yy";
-    static const UChar text[3] = "75";
+    U_STRING_DECL(pattern, "yyyy", 4);
+    U_STRING_DECL(pattern2, "yy", 2);
+    U_STRING_DECL(text, "75", 2);
+
+    U_STRING_INIT(pattern, "yyyy", 4);
+    U_STRING_INIT(pattern2, "yy", 2);
+    U_STRING_INIT(text, "75", 2);
 
     simpleDateFormat = udat_open(UDAT_FULL, UDAT_FULL, "en-GB", 0, 0, 0, 0, &ec);
     udat_applyPattern(simpleDateFormat, 0, pattern, u_strlen(pattern));