ICU-9168 Add some more fix for uconfig and header test failures

X-SVN-Rev: 31577
This commit is contained in:
Michael Ow 2012-03-02 20:18:40 +00:00
parent 937b385fe4
commit 2e9b4064b7
6 changed files with 6 additions and 8 deletions

View file

@ -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());
}

View file

@ -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:

View file

@ -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

View file

@ -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);
}

View file

@ -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

View file

@ -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;