ICU-9721 Fix some uconfig test failures

X-SVN-Rev: 33311
This commit is contained in:
Michael Ow 2013-02-23 16:40:06 +00:00
parent 40d1216e5e
commit d0ef650ea4
3 changed files with 10 additions and 1 deletions

View File

@ -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() +

View File

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

View File

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