From 2e9b4064b73e4234227b3d38babc598577003895 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Fri, 2 Mar 2012 20:18:40 +0000 Subject: [PATCH] ICU-9168 Add some more fix for uconfig and header test failures X-SVN-Rev: 31577 --- icu4c/source/i18n/smpdtfmt.cpp | 2 +- icu4c/source/i18n/unicode/dtfmtsym.h | 2 ++ icu4c/source/i18n/unicode/udat.h | 2 -- icu4c/source/test/cintltst/cdattst.c | 2 -- icu4c/source/test/hdrtst/cxxfiles.txt | 4 +++- icu4c/source/test/intltest/dtfmttst.cpp | 2 -- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/icu4c/source/i18n/smpdtfmt.cpp b/icu4c/source/i18n/smpdtfmt.cpp index 025f0ccae18..7df5f69c1bc 100644 --- a/icu4c/source/i18n/smpdtfmt.cpp +++ b/icu4c/source/i18n/smpdtfmt.cpp @@ -1536,8 +1536,8 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, firstField.toTitle(NULL, fLocale, U_TITLECASE_NO_LOWERCASE | U_TITLECASE_NO_BREAK_ADJUSTMENT); appendTo.replaceBetween(beginOffset, appendTo.length(), firstField); } + } #endif - } handler.addAttribute(fgPatternIndexToDateFormatField[patternCharIndex], beginOffset, appendTo.length()); } diff --git a/icu4c/source/i18n/unicode/dtfmtsym.h b/icu4c/source/i18n/unicode/dtfmtsym.h index dd511bc2ff4..1da51eb4644 100644 --- a/icu4c/source/i18n/unicode/dtfmtsym.h +++ b/icu4c/source/i18n/unicode/dtfmtsym.h @@ -718,12 +718,14 @@ private: */ UnicodeString fLocalPatternChars; +#ifndef U_HIDE_INTERNAL_API /** * Capitalization transforms. For each usage type, the first array element indicates * whether to titlecase for uiListOrMenu context, the second indicates whether to * titlecase for stand-alone context. */ UBool fCapitalization[kCapContextUsageTypeCount][2]; +#endif private: diff --git a/icu4c/source/i18n/unicode/udat.h b/icu4c/source/i18n/unicode/udat.h index 3b64b99635e..3882b28d9f3 100644 --- a/icu4c/source/i18n/unicode/udat.h +++ b/icu4c/source/i18n/unicode/udat.h @@ -178,14 +178,12 @@ typedef enum UDateFormatStyle { * @draft ICU 49 */ typedef enum UDateFormatContextType { -#if !UCONFIG_NO_BREAK_ITERATION /** * Type (key) for specifying the capitalization context for which a date * is to be formatted (possible values are in UDateFormatContextValue). * @draft ICU 49 */ UDAT_CAPITALIZATION = 1 -#endif } UDateFormatContextType; /** Values for date format context types diff --git a/icu4c/source/test/cintltst/cdattst.c b/icu4c/source/test/cintltst/cdattst.c index 34b396af61d..edc3afb1915 100644 --- a/icu4c/source/test/cintltst/cdattst.c +++ b/icu4c/source/test/cintltst/cdattst.c @@ -1287,7 +1287,6 @@ static void TestContext(void) { if ( U_FAILURE(status) ) { log_err("FAIL: udatpg_getBestPattern for locale %s, status %s\n", textContextItemPtr->locale, u_errorName(status) ); } else { -#if !UCONFIG_NO_BREAK_ITERATION udat_applyPattern(udfmt, FALSE, ubuf, len); udat_setDefaultContext(udfmt, UDAT_CAPITALIZATION, textContextItemPtr->capitalizationContext, &status); if ( U_FAILURE(status) ) { @@ -1316,7 +1315,6 @@ static void TestContext(void) { textContextItemPtr->locale, (int)textContextItemPtr->capitalizationContext, getContext ); } } -#endif } udatpg_close(udtpg); } diff --git a/icu4c/source/test/hdrtst/cxxfiles.txt b/icu4c/source/test/hdrtst/cxxfiles.txt index 8171defe385..8b1ad41d11f 100644 --- a/icu4c/source/test/hdrtst/cxxfiles.txt +++ b/icu4c/source/test/hdrtst/cxxfiles.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2001-2011 International Business Machines +# Copyright (c) 2001-2012 International Business Machines # Corporation and others. All Rights Reserved. # Begin temporary addition. # These are very bad "C" APIs that do not work with a C compiler and @@ -85,6 +85,8 @@ tmunit.h tmutamt.h tmutfmt.h translit.h +tzfmt.h +tznames.h tzrule.h tztrans.h ucharstrie.h diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index 359fb0ecfb0..7832af732c1 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -3875,7 +3875,6 @@ void DateFormatTest::TestContext() if (U_FAILURE(status)) { dataerrln(UnicodeString("FAIL: Unable to create SimpleDateFormat for specified pattern with locale ") + UnicodeString(itemPtr->locale)); } else { -#if !UCONFIG_NO_BREAK_ITERATION UDateFormatContextType contextType = UDAT_CAPITALIZATION; UDateFormatContextValue contextValue = itemPtr->capitalizationContext; UnicodeString result; @@ -3886,7 +3885,6 @@ void DateFormatTest::TestContext() ", capitalizationContext " + (int)itemPtr->capitalizationContext + ", expected " + itemPtr->expectedFormat + ", got " + result); } -#endif } if (sdmft) { delete sdmft; -- 2.40.0