/external/icu/icu4c/source/test/cintltst/ |
D | cstrcase.c | 45 UErrorCode errorCode; in TestCaseLower() local 49 errorCode=U_ZERO_ERROR; in TestCaseLower() 53 &errorCode); in TestCaseLower() 54 if( U_FAILURE(errorCode) || in TestCaseLower() 61 u_errorName(errorCode), in TestCaseLower() 71 errorCode=U_ZERO_ERROR; in TestCaseLower() 75 &errorCode); in TestCaseLower() 76 if( U_FAILURE(errorCode) || in TestCaseLower() 83 u_errorName(errorCode), in TestCaseLower() 89 errorCode=U_ZERO_ERROR; in TestCaseLower() [all …]
|
D | cnormtst.c | 551 UErrorCode errorCode; in TestIsNormalized() local 556 errorCode=U_ZERO_ERROR; in TestIsNormalized() 557 if(!unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode) || U_FAILURE(errorCode)) { in TestIsNormalized() 558 …rr("error: !isNormalized(<U+0300>, NFC) (%s) - (Are you missing data?)\n", u_errorName(errorCode)); in TestIsNormalized() 562 errorCode=U_TRUNCATED_CHAR_FOUND; in TestIsNormalized() 563 (void)unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode); in TestIsNormalized() 564 if(errorCode!=U_TRUNCATED_CHAR_FOUND) { in TestIsNormalized() 565 …ror: isNormalized(U_TRUNCATED_CHAR_FOUND) changed the error code to %s\n", u_errorName(errorCode)); in TestIsNormalized() 569 errorCode=U_ZERO_ERROR; in TestIsNormalized() 570 (void)unorm_isNormalized(NULL, 1, UNORM_NFC, &errorCode); in TestIsNormalized() [all …]
|
D | trie2test.c | 520 UErrorCode errorCode; in testFrozenTrie() local 534 errorCode=U_ZERO_ERROR; in testFrozenTrie() 536 utrie2_set32(trie, 1, 234, &errorCode); in testFrozenTrie() 538 if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) { in testFrozenTrie() 540 testName, u_errorName(errorCode)); in testFrozenTrie() 544 errorCode=U_ZERO_ERROR; in testFrozenTrie() 545 utrie2_setRange32(trie, 1, 5, 234, TRUE, &errorCode); in testFrozenTrie() 547 if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) { in testFrozenTrie() 549 testName, u_errorName(errorCode)); in testFrozenTrie() 553 errorCode=U_ZERO_ERROR; in testFrozenTrie() [all …]
|
D | custrtrn.c | 891 UErrorCode errorCode; in Test_FromUTF8() local 894 errorCode=U_ZERO_ERROR; in Test_FromUTF8() 896 destPointer=u_strFromUTF8(NULL, 0, &destLength, (const char *)bytes, 3, &errorCode); in Test_FromUTF8() 897 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || destPointer!=NULL || destLength!=1) { in Test_FromUTF8() 899 (long)destLength, u_errorName(errorCode)); in Test_FromUTF8() 903 errorCode=U_ZERO_ERROR; in Test_FromUTF8() 905 destPointer=u_strFromUTF8(NULL, 0, &destLength, (const char *)bytes, 4, &errorCode); in Test_FromUTF8() 906 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || destPointer!=NULL || destLength!=2) { in Test_FromUTF8() 908 (long)destLength, u_errorName(errorCode)); in Test_FromUTF8() 912 errorCode=U_ZERO_ERROR; in Test_FromUTF8() [all …]
|
D | cucdapi.c | 34 UErrorCode errorCode) { in assertEqualScripts() argument 37 if(U_FAILURE(errorCode)) { in assertEqualScripts() 38 log_err("Failed: %s - %s\n", msg, u_errorName(errorCode)); in assertEqualScripts() 487 UErrorCode errorCode=U_ZERO_ERROR; in TestUScriptCodeAPI() local 489 USCRIPT_COMMON==uscript_getScript(0x0640, &errorCode) && in TestUScriptCodeAPI() 490 USCRIPT_INHERITED==uscript_getScript(0x0650, &errorCode) && in TestUScriptCodeAPI() 491 USCRIPT_ARABIC==uscript_getScript(0xfdf2, &errorCode)) || in TestUScriptCodeAPI() 492 U_FAILURE(errorCode) in TestUScriptCodeAPI() 562 UErrorCode errorCode; in TestGetScriptExtensions() local 565 errorCode=U_PARSE_ERROR; in TestGetScriptExtensions() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | ucol_res.cpp | 82 CollationLoader::loadRootRules(UErrorCode &errorCode) { in loadRootRules() argument 83 if(U_FAILURE(errorCode)) { return; } in loadRootRules() 84 rootBundle = ures_open(U_ICUDATA_COLL, kRootLocaleName, &errorCode); in loadRootRules() 85 if(U_FAILURE(errorCode)) { return; } in loadRootRules() 86 rootRules = ures_getStringByKey(rootBundle, "UCARules", &rootRulesLength, &errorCode); in loadRootRules() 87 if(U_FAILURE(errorCode)) { in loadRootRules() 99 UErrorCode errorCode = U_ZERO_ERROR; in appendRootRules() local 100 umtx_initOnce(gInitOnceUcolRes, CollationLoader::loadRootRules, errorCode); in appendRootRules() 101 if(U_SUCCESS(errorCode)) { in appendRootRules() 108 UnicodeString &rules, UErrorCode &errorCode) { in loadRules() argument [all …]
|
D | dayperiodrules.cpp | 53 virtual void put(const char *key, ResourceValue &value, UBool, UErrorCode &errorCode) { in put() 54 ResourceTable dayPeriodData = value.getTable(errorCode); in put() 55 if (U_FAILURE(errorCode)) { return; } in put() 59 ResourceTable locales = value.getTable(errorCode); in put() 60 if (U_FAILURE(errorCode)) { return; } in put() 63 UnicodeString setNum_str = value.getUnicodeString(errorCode); in put() 64 int32_t setNum = parseSetNum(setNum_str, errorCode); in put() 65 … uhash_puti(data->localeToRuleSetNumMap, const_cast<char *>(key), setNum, &errorCode); in put() 71 errorCode = U_MEMORY_ALLOCATION_ERROR; in put() 74 ResourceTable rules = value.getTable(errorCode); in put() [all …]
|
D | collationruleparser.cpp | 58 CollationRuleParser::CollationRuleParser(const CollationData *base, UErrorCode &errorCode) in CollationRuleParser() argument 59 : nfd(*Normalizer2::getNFDInstance(errorCode)), in CollationRuleParser() 60 nfc(*Normalizer2::getNFCInstance(errorCode)), in CollationRuleParser() 74 UErrorCode &errorCode) { in parse() argument 75 if(U_FAILURE(errorCode)) { return; } in parse() 85 parse(ruleString, errorCode); in parse() 89 CollationRuleParser::parse(const UnicodeString &ruleString, UErrorCode &errorCode) { in parse() argument 90 if(U_FAILURE(errorCode)) { return; } in parse() 102 parseRuleChain(errorCode); in parse() 105 parseSetting(errorCode); in parse() [all …]
|
D | listformatter.cpp | 48 UErrorCode &errorCode) : in ListFormatInternal() 49 twoPattern(two, 2, 2, errorCode), in ListFormatInternal() 50 startPattern(start, 2, 2, errorCode), in ListFormatInternal() 51 middlePattern(middle, 2, 2, errorCode), in ListFormatInternal() 52 endPattern(end, 2, 2, errorCode) {} in ListFormatInternal() 54 ListFormatInternal(const ListFormatData &data, UErrorCode &errorCode) : in ListFormatInternal() 55 twoPattern(data.twoPattern, errorCode), in ListFormatInternal() 56 startPattern(data.startPattern, errorCode), in ListFormatInternal() 57 middlePattern(data.middlePattern, errorCode), in ListFormatInternal() 58 endPattern(data.endPattern, errorCode) { } in ListFormatInternal() [all …]
|
D | rulebasedcollator.cpp | 154 const RuleBasedCollator *base, UErrorCode &errorCode) in RuleBasedCollator() argument 162 if(U_FAILURE(errorCode)) { return; } in RuleBasedCollator() 164 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in RuleBasedCollator() 167 const CollationTailoring *root = CollationRoot::getRoot(errorCode); in RuleBasedCollator() 168 if(U_FAILURE(errorCode)) { return; } in RuleBasedCollator() 170 errorCode = U_UNSUPPORTED_ERROR; in RuleBasedCollator() 175 errorCode = U_MEMORY_ALLOCATION_ERROR; in RuleBasedCollator() 178 CollationDataReader::read(base->tailoring, bin, length, *t, errorCode); in RuleBasedCollator() 179 if(U_FAILURE(errorCode)) { return; } in RuleBasedCollator() 181 adoptTailoring(t.orphan(), errorCode); in RuleBasedCollator() [all …]
|
D | collationbuilder.cpp | 62 const char *&errorReason, UErrorCode &errorCode); 71 const char *& /*errorReason*/, UErrorCode &errorCode) { in getRules() argument 72 CollationLoader::loadRules(localeID, collationType, rules, errorCode); in getRules() 95 RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, UErrorCode &errorCode) in RuleBasedCollator() argument 103 internalBuildTailoring(rules, UCOL_DEFAULT, UCOL_DEFAULT, NULL, NULL, errorCode); in RuleBasedCollator() 107 UErrorCode &errorCode) in RuleBasedCollator() argument 115 internalBuildTailoring(rules, strength, UCOL_DEFAULT, NULL, NULL, errorCode); in RuleBasedCollator() 120 UErrorCode &errorCode) in RuleBasedCollator() argument 128 internalBuildTailoring(rules, UCOL_DEFAULT, decompositionMode, NULL, NULL, errorCode); in RuleBasedCollator() 134 UErrorCode &errorCode) in RuleBasedCollator() argument [all …]
|
D | collationdatabuilder.cpp | 137 virtual UChar32 nextCodePoint(UErrorCode &errorCode); 138 virtual UChar32 previousCodePoint(UErrorCode &errorCode); 141 virtual void forwardNumCodePoints(int32_t num, UErrorCode &errorCode); 142 virtual void backwardNumCodePoints(int32_t num, UErrorCode &errorCode); 145 virtual uint32_t getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode); 181 UErrorCode errorCode = U_ZERO_ERROR; in fetchCEs() local 182 while(U_SUCCESS(errorCode) && pos < s->length()) { in fetchCEs() 195 appendCEsFromCE32(d, c, ce32, /*forward=*/ TRUE, errorCode); in fetchCEs() 196 U_ASSERT(U_SUCCESS(errorCode)); in fetchCEs() 257 DataBuilderCollationIterator::getCE32FromBuilderData(uint32_t ce32, UErrorCode &errorCode) { in getCE32FromBuilderData() argument [all …]
|
D | collationiterator.cpp | 37 CollationIterator::CEBuffer::ensureAppendCapacity(int32_t appCap, UErrorCode &errorCode) { in ensureAppendCapacity() argument 40 if(U_FAILURE(errorCode)) { return FALSE; } in ensureAppendCapacity() 50 errorCode = U_MEMORY_ALLOCATION_ERROR; in ensureAppendCapacity() 155 UErrorCode errorCode = U_ZERO_ERROR; in CollationIterator() local 157 if(length > 0 && ceBuffer.ensureAppendCapacity(length, errorCode)) { in CollationIterator() 198 CollationIterator::fetchCEs(UErrorCode &errorCode) { in fetchCEs() argument 199 while(U_SUCCESS(errorCode) && nextCE(errorCode) != Collation::NO_CE) { in fetchCEs() 207 CollationIterator::handleNextCE32(UChar32 &c, UErrorCode &errorCode) { in handleNextCE32() argument 208 c = nextCodePoint(errorCode); in handleNextCE32() 233 CollationIterator::getCE32FromBuilderData(uint32_t /*ce32*/, UErrorCode &errorCode) { in getCE32FromBuilderData() argument [all …]
|
/external/icu/icu4c/source/common/ |
D | loadednormalizer2impl.cpp | 39 void load(const char *packageName, const char *name, UErrorCode &errorCode); 77 LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCode &errorCode) { in load() argument 78 if(U_FAILURE(errorCode)) { in load() 81 memory=udata_openChoice(packageName, "nrm", name, isAcceptable, this, &errorCode); in load() 82 if(U_FAILURE(errorCode)) { in load() 89 errorCode=U_INVALID_FORMAT_ERROR; // Not enough indexes. in load() 97 &errorCode); in load() 98 if(U_FAILURE(errorCode)) { in load() 118 UErrorCode &errorCode) { in createInstance() argument 119 if(U_FAILURE(errorCode)) { in createInstance() [all …]
|
D | characterproperties.cpp | 88 void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { in initInclusion() argument 92 errorCode = U_INTERNAL_PROGRAM_ERROR; in initInclusion() 99 errorCode = U_MEMORY_ALLOCATION_ERROR; in initInclusion() 113 uchar_addPropertyStarts(&sa, &errorCode); in initInclusion() 116 upropsvec_addPropertyStarts(&sa, &errorCode); in initInclusion() 119 uchar_addPropertyStarts(&sa, &errorCode); in initInclusion() 120 upropsvec_addPropertyStarts(&sa, &errorCode); in initInclusion() 124 const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(errorCode); in initInclusion() 125 if(U_SUCCESS(errorCode)) { in initInclusion() 126 impl->addPropertyStarts(&sa, errorCode); in initInclusion() [all …]
|
D | messagepattern.cpp | 96 UErrorCode &errorCode); 97 UBool ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode); 113 UErrorCode &errorCode) { in copyFrom() argument 114 if(U_SUCCESS(errorCode) && length>0) { in copyFrom() 116 errorCode=U_MEMORY_ALLOCATION_ERROR; in copyFrom() 125 …PatternList<T, stackCapacity>::ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode) { in ensureCapacityForOneMore() argument 126 if(U_FAILURE(errorCode)) { in ensureCapacityForOneMore() 132 errorCode=U_MEMORY_ALLOCATION_ERROR; in ensureCapacityForOneMore() 146 MessagePattern::MessagePattern(UErrorCode &errorCode) in MessagePattern() argument 151 init(errorCode); in MessagePattern() [all …]
|
D | norm2allmodes.h | 41 UErrorCode &errorCode) const { in normalize() argument 42 if(U_FAILURE(errorCode)) { in normalize() 48 errorCode=U_ILLEGAL_ARGUMENT_ERROR; in normalize() 54 if(buffer.init(src.length(), errorCode)) { in normalize() 55 normalize(sArray, sArray+src.length(), buffer, errorCode); in normalize() 61 ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0; 67 UErrorCode &errorCode) const { in normalizeSecondAndAppend() argument 68 return normalizeSecondAndAppend(first, second, TRUE, errorCode); in normalizeSecondAndAppend() 73 UErrorCode &errorCode) const { in append() argument 74 return normalizeSecondAndAppend(first, second, FALSE, errorCode); in append() [all …]
|
D | locresdata.cpp | 54 UErrorCode errorCode; in uloc_getTableStringWithFallback() local 61 errorCode=U_ZERO_ERROR; in uloc_getTableStringWithFallback() 62 rb=ures_open(path, locale, &errorCode); in uloc_getTableStringWithFallback() 64 if(U_FAILURE(errorCode)) { in uloc_getTableStringWithFallback() 66 *pErrorCode=errorCode; in uloc_getTableStringWithFallback() 68 } else if(errorCode==U_USING_DEFAULT_WARNING || in uloc_getTableStringWithFallback() 69 (errorCode==U_USING_FALLBACK_WARNING && *pErrorCode!=U_USING_DEFAULT_WARNING) in uloc_getTableStringWithFallback() 72 *pErrorCode=errorCode; in uloc_getTableStringWithFallback() 78 ures_getByKeyWithFallback(rb, tableKey, &table, &errorCode); in uloc_getTableStringWithFallback() 90 ures_getByKeyWithFallback(&table,subTableKey, &table, &errorCode); in uloc_getTableStringWithFallback() [all …]
|
D | filterednormalizer2.cpp | 38 UErrorCode &errorCode) const { in normalize() 39 uprv_checkCanGetBuffer(src, errorCode); in normalize() 40 if(U_FAILURE(errorCode)) { in normalize() 45 errorCode=U_ILLEGAL_ARGUMENT_ERROR; in normalize() 49 return normalize(src, dest, USET_SPAN_SIMPLE, errorCode); in normalize() 63 UErrorCode &errorCode) const { in normalize() 78 tempDest, errorCode)); in normalize() 79 if(U_FAILURE(errorCode)) { in normalize() 92 Edits *edits, UErrorCode &errorCode) const { in normalizeUTF8() 93 if (U_FAILURE(errorCode)) { in normalizeUTF8() [all …]
|
D | charstr.cpp | 38 CharString &CharString::copyFrom(const CharString &s, UErrorCode &errorCode) { in copyFrom() argument 39 if(U_SUCCESS(errorCode) && this!=&s && ensureCapacity(s.len+1, 0, errorCode)) { in copyFrom() 65 CharString &CharString::append(char c, UErrorCode &errorCode) { in append() argument 66 if(ensureCapacity(len+2, 0, errorCode)) { in append() 73 CharString &CharString::append(const char *s, int32_t sLength, UErrorCode &errorCode) { in append() argument 74 if(U_FAILURE(errorCode)) { in append() 78 errorCode=U_ILLEGAL_ARGUMENT_ERROR; in append() 89 errorCode=U_INTERNAL_PROGRAM_ERROR; in append() 98 return append(CharString(s, sLength, errorCode), errorCode); in append() 99 } else if(ensureCapacity(len+sLength+1, 0, errorCode)) { in append() [all …]
|
/external/icu/icu4c/source/test/intltest/ |
D | itutil.cpp | 169 ErrorCode errorCode; in TestErrorCode() local 170 if(errorCode.get()!=U_ZERO_ERROR || !errorCode.isSuccess() || errorCode.isFailure()) { in TestErrorCode() 174 errorCode.assertSuccess(); in TestErrorCode() 175 if(errorCode.errorName()!=u_errorName(U_ZERO_ERROR)) { in TestErrorCode() 178 RefPlusOne(errorCode); in TestErrorCode() 179 … if(errorCode.get()!=U_ILLEGAL_ARGUMENT_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode() 182 PtrPlusTwo(errorCode); in TestErrorCode() 183 if(errorCode.get()!=U_INVALID_FORMAT_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode() 186 errorCode.set(U_PARSE_ERROR); in TestErrorCode() 187 if(errorCode.get()!=U_PARSE_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode() [all …]
|
D | collationtest.cpp | 99 UBool readNonEmptyLine(UCHARBUF *f, IcuTestErrorCode &errorCode); 100 … void parseString(int32_t &start, UnicodeString &prefix, UnicodeString &s, UErrorCode &errorCode); 101 Collation::Level parseRelationAndString(UnicodeString &s, IcuTestErrorCode &errorCode); 102 void parseAndSetAttribute(IcuTestErrorCode &errorCode); 103 void parseAndSetReorderCodes(int32_t start, IcuTestErrorCode &errorCode); 104 void buildTailoring(UCHARBUF *f, IcuTestErrorCode &errorCode); 105 void setRootCollator(IcuTestErrorCode &errorCode); 106 void setLocaleCollator(IcuTestErrorCode &errorCode); 108 UBool needsNormalization(const UnicodeString &s, UErrorCode &errorCode) const; 112 IcuTestErrorCode &errorCode); [all …]
|
D | convtest.cpp | 56 UErrorCode errorCode=U_ZERO_ERROR; in ConversionTest() local 57 utf8Cnv=ucnv_open("UTF-8", &errorCode); in ConversionTest() 58 ucnv_setToUCallBack(utf8Cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in ConversionTest() 59 if(U_FAILURE(errorCode)) { in ConversionTest() 97 UErrorCode errorCode; in TestToUnicode() local 100 errorCode=U_ZERO_ERROR; in TestToUnicode() 101 dataModule=TestDataModule::getTestDataModule("conversion", *this, errorCode); in TestToUnicode() 102 if(U_SUCCESS(errorCode)) { in TestToUnicode() 103 testData=dataModule->createTestData("toUnicode", errorCode); in TestToUnicode() 104 if(U_SUCCESS(errorCode)) { in TestToUnicode() [all …]
|
D | ucdtest.cpp | 38 UErrorCode errorCode=U_ZERO_ERROR; in UnicodeTest() local 39 unknownPropertyNames=new U_NAMESPACE_QUALIFIER Hashtable(errorCode); in UnicodeTest() 40 if(U_FAILURE(errorCode)) { in UnicodeTest() 46 unknownPropertyNames->puti(UnicodeString(ignorePropNames[i], -1, US_INV), 1, errorCode); in UnicodeTest() 190 UErrorCode errorCode=U_ZERO_ERROR; in derivedPropsLineFn() local 191 me->unknownPropertyNames->puti(propName, 1, errorCode); in derivedPropsLineFn() 222 UErrorCode errorCode=U_ZERO_ERROR; in TestAdditionalProperties() local 223 u_parseDelimitedFile(path, ';', fields, 2, derivedPropsLineFn, this, &errorCode); in TestAdditionalProperties() 224 if(U_FAILURE(errorCode)) { in TestAdditionalProperties() 225 errln("error parsing DerivedCoreProperties.txt: %s\n", u_errorName(errorCode)); in TestAdditionalProperties() [all …]
|
/external/icu/icu4c/source/test/iotest/ |
D | iotest.cpp | 200 UErrorCode errorCode; in DataDrivenPrintf() local 225 errorCode=U_ZERO_ERROR; in DataDrivenPrintf() 226 dataModule=TestDataModule::getTestDataModule("icuio", logger, errorCode); in DataDrivenPrintf() 227 if(U_SUCCESS(errorCode)) { in DataDrivenPrintf() 228 testData=dataModule->createTestData("printf", errorCode); in DataDrivenPrintf() 229 if(U_SUCCESS(errorCode)) { in DataDrivenPrintf() 230 for(i=0; testData->nextCase(testCase, errorCode); ++i) { in DataDrivenPrintf() 231 if(U_FAILURE(errorCode)) { in DataDrivenPrintf() 233 i, u_errorName(errorCode)); in DataDrivenPrintf() 234 errorCode=U_ZERO_ERROR; in DataDrivenPrintf() [all …]
|