From d0ef650ea4a44dc6d90776cc479ddac9e9df1e5d Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Sat, 23 Feb 2013 16:40:06 +0000 Subject: [PATCH] ICU-9721 Fix some uconfig test failures X-SVN-Rev: 33311 --- icu4c/source/i18n/identifier_info.cpp | 4 ++++ icu4c/source/i18n/identifier_info.h | 4 ++++ icu4c/source/test/intltest/itspoof.cpp | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/icu4c/source/i18n/identifier_info.cpp b/icu4c/source/i18n/identifier_info.cpp index a25ffea794a..369a0678c59 100644 --- a/icu4c/source/i18n/identifier_info.cpp +++ b/icu4c/source/i18n/identifier_info.cpp @@ -228,6 +228,8 @@ const ScriptSet *IdentifierInfo::getCommonAmongAlternates() const { return fCommonAmongAlternates; } +#if !UCONFIG_NO_NORMALIZATION + URestrictionLevel IdentifierInfo::getRestrictionLevel(UErrorCode &status) const { if (!fIdentifierProfile->containsAll(*fIdentifier) || getNumerics()->size() > 1) { return USPOOF_UNRESTRICTIVE; @@ -259,6 +261,8 @@ URestrictionLevel IdentifierInfo::getRestrictionLevel(UErrorCode &status) const return USPOOF_MINIMALLY_RESTRICTIVE; } +#endif /* !UCONFIG_NO_NORMALIZATION */ + int32_t IdentifierInfo::getScriptCount() const { // Note: Common and Inherited scripts were removed by setIdentifier(), and do not appear in fRequiredScripts. int32_t count = fRequiredScripts->countMembers() + diff --git a/icu4c/source/i18n/identifier_info.h b/icu4c/source/i18n/identifier_info.h index 49c98217209..c7cab617926 100644 --- a/icu4c/source/i18n/identifier_info.h +++ b/icu4c/source/i18n/identifier_info.h @@ -147,6 +147,8 @@ class U_I18N_API IdentifierInfo : public UMemory { */ int32_t getScriptCount() const; +#if !UCONFIG_NO_NORMALIZATION + /** * Find the "tightest" restriction level that the identifier satisfies. * @@ -155,6 +157,8 @@ class U_I18N_API IdentifierInfo : public UMemory { */ URestrictionLevel getRestrictionLevel(UErrorCode &status) const; +#endif /*!UCONFIG_NO_NORMALIZATION */ + UnicodeString toString() const; /** diff --git a/icu4c/source/test/intltest/itspoof.cpp b/icu4c/source/test/intltest/itspoof.cpp index fca60668043..50971ca87ca 100644 --- a/icu4c/source/test/intltest/itspoof.cpp +++ b/icu4c/source/test/intltest/itspoof.cpp @@ -450,7 +450,6 @@ void IntlTestSpoof::testConfData() { } } } -#endif // UCONFIG_NO_REGULAR_EXPRESSIONS // testIdentifierInfo. Note that IdentifierInfo is not public ICU API at this time void IntlTestSpoof::testIdentifierInfo() { @@ -754,3 +753,5 @@ void IntlTestSpoof::testMixedNumbers() { uspoof_close(sc); } } + +#endif /* !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO */ -- 2.40.0