]> granicus.if.org Git - icu/commitdiff
ICU-10740 Fix uconfig test errors
authorMichael Ow <mow@svn.icu-project.org>
Sat, 15 Mar 2014 06:08:42 +0000 (06:08 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Sat, 15 Mar 2014 06:08:42 +0000 (06:08 +0000)
X-SVN-Rev: 35480

icu4c/source/i18n/quantityformatter.cpp
icu4c/source/i18n/rbnf.cpp
icu4c/source/i18n/reldtfmt.cpp
icu4c/source/i18n/smpdtfmt.cpp
icu4c/source/i18n/unicode/measfmt.h
icu4c/source/test/cintltst/cnumtst.c
icu4c/source/test/hdrtst/cxxfiles.txt
icu4c/source/test/intltest/regextst.cpp
icu4c/source/test/letest/cletest.c
icu4c/source/test/letest/letest.cpp

index 5b01f650ed3579bbafe1e43a8d0e1c177241962e..4138aee030b5e2e3a578a6c8e4cb61e698d5444d 100644 (file)
@@ -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 */
index 37c28866702da08cf3d8f702f18b5728ea360c55..894e6b6d2a38e554f5ea6a752eca71d377047abc 100644 (file)
@@ -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();
 }
index 5cbb295553b1e1595917eaf2b43417b4e53113e0..81fb77749a594745c48d5daa863e6bad5705f899 100644 (file)
@@ -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
 }
 
 
index c29b55c2959433a1a4f0af79abdb1e283d8b0f9d..4752de5e8a9a37ccee06a479578d49ed9d7aed86 100644 (file)
@@ -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;
 }
index 1f39a6ab66f5c00459f919a6df5c6cfd96326d57..2a93b6e7f9299c7328e047832bfef7ebbab3fba5 100644 (file)
@@ -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
index 84590441fe868a9ce2b63cefb561c25f26d143fe..a6420ffa31b34427d59d5539f80e0a4f7f474b10 100644 (file)
@@ -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 */
index 60c09cceabcedf17e43ebc4a4ca6ed64df3cc327..796b1e72dacb5446760099be8a7824ea24d8a91f 100644 (file)
@@ -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
index fe0d8f609a5908fc91c2ce437f2ba646157c1e2f..9c09d4f6c557b8266c3f45189df143722428b893 100644 (file)
@@ -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 */
 }
 
 
index ed426d821e77a349bdc917cac732168feb1197f8..ca4e96d570e80ac54bf6dcadc480490184205e62 100644 (file)
@@ -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)
index 97393c155eb5679d7646e7cca9c79e73d344291f..6ab32dd12b8ff629321c5043cfe4d455bd22ed6a 100644 (file)
@@ -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