mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-10740 Fix uconfig test errors
X-SVN-Rev: 35480
This commit is contained in:
parent
8fdebe3515
commit
3daf54af40
10 changed files with 35 additions and 8 deletions
|
@ -19,6 +19,8 @@
|
|||
|
||||
#define LENGTHOF(array) (int32_t)(sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
// other must always be first.
|
||||
|
@ -175,3 +177,5 @@ UnicodeString &QuantityFormatter::format(
|
|||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -863,7 +863,9 @@ RuleBasedNumberFormat::operator=(const RuleBasedNumberFormat& rhs)
|
|||
capitalizationInfoSet = rhs.capitalizationInfoSet;
|
||||
capitalizationForUIListMenu = rhs.capitalizationForUIListMenu;
|
||||
capitalizationForStandAlone = rhs.capitalizationForStandAlone;
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
capitalizationBrkIter = (rhs.capitalizationBrkIter!=NULL)? rhs.capitalizationBrkIter->clone(): NULL;
|
||||
#endif
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -1616,8 +1618,10 @@ RuleBasedNumberFormat::dispose()
|
|||
delete lenientParseRules;
|
||||
lenientParseRules = NULL;
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
delete capitalizationBrkIter;
|
||||
capitalizationBrkIter = NULL;
|
||||
#endif
|
||||
|
||||
if (localizations) localizations = localizations->unref();
|
||||
}
|
||||
|
|
|
@ -62,9 +62,11 @@ RelativeDateFormat::RelativeDateFormat(const RelativeDateFormat& other) :
|
|||
fDates = (URelativeString*) uprv_malloc(sizeof(fDates[0])*fDatesLen);
|
||||
uprv_memcpy(fDates, other.fDates, sizeof(fDates[0])*fDatesLen);
|
||||
}
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
if (other.fCapitalizationBrkIter != NULL) {
|
||||
fCapitalizationBrkIter = (other.fCapitalizationBrkIter)->clone();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatStyle dateStyle,
|
||||
|
@ -124,7 +126,9 @@ RelativeDateFormat::~RelativeDateFormat() {
|
|||
delete fDateTimeFormatter;
|
||||
delete fCombinedFormat;
|
||||
uprv_free(fDates);
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
delete fCapitalizationBrkIter;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -239,8 +239,10 @@ SimpleDateFormat::~SimpleDateFormat()
|
|||
delete cur->nf;
|
||||
uprv_free(cur);
|
||||
}
|
||||
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
delete fCapitalizationBrkIter;
|
||||
#endif
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -501,10 +503,12 @@ SimpleDateFormat& SimpleDateFormat::operator=(const SimpleDateFormat& other)
|
|||
fTimeZoneFormat = NULL; // forces lazy instantiation with the other locale
|
||||
fLocale = other.fLocale;
|
||||
}
|
||||
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
if (other.fCapitalizationBrkIter != NULL) {
|
||||
fCapitalizationBrkIter = (other.fCapitalizationBrkIter)->clone();
|
||||
}
|
||||
#endif
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -245,6 +245,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
|
||||
#ifndef U_HIDE_INTERNAL_API
|
||||
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
/**
|
||||
* ICU use only.
|
||||
* Initialize or change MeasureFormat class from subclass.
|
||||
|
@ -255,7 +256,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
UMeasureFormatWidth width,
|
||||
NumberFormat *nfToAdopt,
|
||||
UErrorCode &status);
|
||||
|
||||
#endif
|
||||
/**
|
||||
* ICU use only.
|
||||
* Allows subclass to change locale. Note that this method also changes
|
||||
|
@ -302,7 +303,9 @@ class U_I18N_API MeasureFormat : public Format {
|
|||
const MeasureFormatCacheData *cache;
|
||||
const SharedNumberFormat *numberFormat;
|
||||
const SharedPluralRules *pluralRules;
|
||||
#ifndef U_HIDE_DRAFT_API
|
||||
UMeasureFormatWidth width;
|
||||
#endif
|
||||
|
||||
// Declared outside of MeasureFormatSharedData because ListFormatter
|
||||
// objects are relatively cheap to copy; therefore, they don't need to be
|
||||
|
|
|
@ -2496,7 +2496,7 @@ static void TestContext(void) {
|
|||
} else {
|
||||
log_data_err("unum_open UNUM_SPELLOUT for en fails with status %s\n", myErrorName(status));
|
||||
}
|
||||
|
||||
#if !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_BREAK_ITERATION
|
||||
for (itemPtr = tcItems; itemPtr->locale != NULL; itemPtr++) {
|
||||
UChar ubufResult[kUBufMax];
|
||||
int32_t ulenRes;
|
||||
|
@ -2526,6 +2526,7 @@ static void TestContext(void) {
|
|||
}
|
||||
unum_close(unum);
|
||||
}
|
||||
#endif /* #if !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_BREAK_ITERATION */
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2001-2013 International Business Machines
|
||||
# Copyright (c) 2001-2014 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
|
||||
|
@ -44,6 +44,7 @@ dtrule.h
|
|||
enumset.h
|
||||
errorcode.h
|
||||
fieldpos.h
|
||||
filteredbrk.h
|
||||
fmtable.h
|
||||
format.h
|
||||
fpositer.h
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 2002-2013, International Business Machines Corporation and
|
||||
* Copyright (c) 2002-2014, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
|
||||
|
@ -5209,6 +5209,7 @@ void RegexTest::Bug7029() {
|
|||
// for details on what to do in case of a failure of this test.
|
||||
//
|
||||
void RegexTest::Bug9283() {
|
||||
#if !UCONFIG_NO_NORMALIZATION
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UnicodeSet supplementalsWithCaseFolding("[[:CWCF:]&[\\U00010000-\\U0010FFFF]]", status);
|
||||
REGEX_CHECK_STATUS;
|
||||
|
@ -5222,6 +5223,7 @@ void RegexTest::Bug9283() {
|
|||
UnicodeString cf = UnicodeString(c).foldCase();
|
||||
REGEX_ASSERT(cf.length() >= 2);
|
||||
}
|
||||
#endif /* #if !UCONFIG_NO_NORMALIZATION */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2008, International Business Machines
|
||||
* Copyright (C) 1999-2014, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -511,6 +511,7 @@ static void U_CALLCONV DataDrivenTest(void)
|
|||
*/
|
||||
static void U_CALLCONV GlyphToCharTest(void)
|
||||
{
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
LEErrorCode status = LE_NO_ERROR;
|
||||
le_font *font;
|
||||
pl_fontRuns *fontRuns;
|
||||
|
@ -728,6 +729,7 @@ close_font:
|
|||
|
||||
finish:
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
U_CFUNC void addCTests(TestNode **root)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1999-2013, International Business Machines
|
||||
* Copyright (C) 1999-2014, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -748,6 +748,7 @@ U_CDECL_BEGIN
|
|||
*/
|
||||
static void U_CALLCONV GlyphToCharTest(void)
|
||||
{
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
LEErrorCode status = LE_NO_ERROR;
|
||||
LEFontInstance *font;
|
||||
FontRuns fontRuns(0);
|
||||
|
@ -958,6 +959,7 @@ close_font:
|
|||
|
||||
finish:
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
U_CDECL_END
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue