/external/icu/icu4c/source/test/cintltst/ |
D | cstrcase.c | 44 UErrorCode errorCode; in TestCaseLower() local 48 errorCode=U_ZERO_ERROR; in TestCaseLower() 52 &errorCode); in TestCaseLower() 53 if( U_FAILURE(errorCode) || in TestCaseLower() 60 u_errorName(errorCode), in TestCaseLower() 70 errorCode=U_ZERO_ERROR; in TestCaseLower() 74 &errorCode); in TestCaseLower() 75 if( U_FAILURE(errorCode) || in TestCaseLower() 82 u_errorName(errorCode), in TestCaseLower() 88 errorCode=U_ZERO_ERROR; in TestCaseLower() [all …]
|
D | cnormtst.c | 550 UErrorCode errorCode; in TestIsNormalized() local 555 errorCode=U_ZERO_ERROR; in TestIsNormalized() 556 if(!unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode) || U_FAILURE(errorCode)) { in TestIsNormalized() 557 …rr("error: !isNormalized(<U+0300>, NFC) (%s) - (Are you missing data?)\n", u_errorName(errorCode)); in TestIsNormalized() 561 errorCode=U_TRUNCATED_CHAR_FOUND; in TestIsNormalized() 562 (void)unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode); in TestIsNormalized() 563 if(errorCode!=U_TRUNCATED_CHAR_FOUND) { in TestIsNormalized() 564 …ror: isNormalized(U_TRUNCATED_CHAR_FOUND) changed the error code to %s\n", u_errorName(errorCode)); in TestIsNormalized() 568 errorCode=U_ZERO_ERROR; in TestIsNormalized() 569 (void)unorm_isNormalized(NULL, 1, UNORM_NFC, &errorCode); in TestIsNormalized() [all …]
|
D | trie2test.c | 488 UErrorCode errorCode; in testFrozenTrie() local 502 errorCode=U_ZERO_ERROR; in testFrozenTrie() 504 utrie2_set32(trie, 1, 234, &errorCode); in testFrozenTrie() 506 if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) { in testFrozenTrie() 508 testName, u_errorName(errorCode)); in testFrozenTrie() 512 errorCode=U_ZERO_ERROR; in testFrozenTrie() 513 utrie2_setRange32(trie, 1, 5, 234, TRUE, &errorCode); in testFrozenTrie() 515 if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) { in testFrozenTrie() 517 testName, u_errorName(errorCode)); in testFrozenTrie() 521 errorCode=U_ZERO_ERROR; in testFrozenTrie() [all …]
|
D | custrtrn.c | 890 UErrorCode errorCode; in Test_FromUTF8() local 893 errorCode=U_ZERO_ERROR; in Test_FromUTF8() 895 destPointer=u_strFromUTF8(NULL, 0, &destLength, (const char *)bytes, 3, &errorCode); in Test_FromUTF8() 896 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || destPointer!=NULL || destLength!=1) { in Test_FromUTF8() 898 (long)destLength, u_errorName(errorCode)); in Test_FromUTF8() 902 errorCode=U_ZERO_ERROR; in Test_FromUTF8() 904 destPointer=u_strFromUTF8(NULL, 0, &destLength, (const char *)bytes, 4, &errorCode); in Test_FromUTF8() 905 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || destPointer!=NULL || destLength!=2) { in Test_FromUTF8() 907 (long)destLength, u_errorName(errorCode)); in Test_FromUTF8() 911 errorCode=U_ZERO_ERROR; in Test_FromUTF8() [all …]
|
D | udatpg_test.c | 76 UErrorCode errorCode=U_ZERO_ERROR; in TestOpenClose() local 82 dtpg=udatpg_open(NULL, &errorCode); in TestOpenClose() 83 if(U_FAILURE(errorCode)) { in TestOpenClose() 84 log_err_status(errorCode, "udatpg_open(NULL) failed - %s\n", u_errorName(errorCode)); in TestOpenClose() 90 dtpg=udatpg_open("de", &errorCode); in TestOpenClose() 91 if(U_FAILURE(errorCode)) { in TestOpenClose() 92 log_err("udatpg_open(de) failed - %s\n", u_errorName(errorCode)); in TestOpenClose() 100 dtpg2=udatpg_clone(dtpg, &errorCode); in TestOpenClose() 101 if(U_FAILURE(errorCode) || dtpg2==NULL) { in TestOpenClose() 102 log_err("udatpg_clone() failed - %s\n", u_errorName(errorCode)); in TestOpenClose() [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() 478 UErrorCode errorCode=U_ZERO_ERROR; in TestUScriptCodeAPI() local 480 USCRIPT_COMMON==uscript_getScript(0x0640, &errorCode) && in TestUScriptCodeAPI() 481 USCRIPT_INHERITED==uscript_getScript(0x0650, &errorCode) && in TestUScriptCodeAPI() 482 USCRIPT_ARABIC==uscript_getScript(0xfdf2, &errorCode)) || in TestUScriptCodeAPI() 483 U_FAILURE(errorCode) in TestUScriptCodeAPI() 553 UErrorCode errorCode; in TestGetScriptExtensions() local 556 errorCode=U_PARSE_ERROR; in TestGetScriptExtensions() [all …]
|
D | cbiditst.c | 174 UErrorCode errorCode=U_ZERO_ERROR; in testBidi() local 178 pBiDi=ubidi_openSized(MAXLEN, 0, &errorCode); in testBidi() 188 log_err("ubidi_openSized() returned NULL, errorCode %s\n", myErrorName(errorCode)); in testBidi() 206 UErrorCode errorCode; in doTests() local 211 errorCode=U_ZERO_ERROR; in doTests() 214 ubidi_setPara(pBiDi, string, -1, paraLevel, NULL, &errorCode); in doTests() 215 if(U_SUCCESS(errorCode)) { in doTests() 222 ubidi_setLine(pBiDi, lineStart, tests[testNumber].lineLimit, pLine, &errorCode); in doTests() 223 if(U_SUCCESS(errorCode)) { in doTests() 229 … testNumber, lineStart, tests[testNumber].lineLimit, myErrorName(errorCode)); in doTests() [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(gInitOnce, 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 | 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/test/intltest/ |
D | itutil.cpp | 155 ErrorCode errorCode; in TestErrorCode() local 156 if(errorCode.get()!=U_ZERO_ERROR || !errorCode.isSuccess() || errorCode.isFailure()) { in TestErrorCode() 160 errorCode.assertSuccess(); in TestErrorCode() 161 if(errorCode.errorName()!=u_errorName(U_ZERO_ERROR)) { in TestErrorCode() 164 RefPlusOne(errorCode); in TestErrorCode() 165 … if(errorCode.get()!=U_ILLEGAL_ARGUMENT_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode() 168 PtrPlusTwo(errorCode); in TestErrorCode() 169 if(errorCode.get()!=U_INVALID_FORMAT_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode() 172 errorCode.set(U_PARSE_ERROR); in TestErrorCode() 173 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 | 55 UErrorCode errorCode=U_ZERO_ERROR; in ConversionTest() local 56 utf8Cnv=ucnv_open("UTF-8", &errorCode); in ConversionTest() 57 ucnv_setToUCallBack(utf8Cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode); in ConversionTest() 58 if(U_FAILURE(errorCode)) { in ConversionTest() 101 UErrorCode errorCode; in TestToUnicode() local 104 errorCode=U_ZERO_ERROR; in TestToUnicode() 105 dataModule=TestDataModule::getTestDataModule("conversion", *this, errorCode); in TestToUnicode() 106 if(U_SUCCESS(errorCode)) { in TestToUnicode() 107 testData=dataModule->createTestData("toUnicode", errorCode); in TestToUnicode() 108 if(U_SUCCESS(errorCode)) { in TestToUnicode() [all …]
|
D | ucdtest.cpp | 35 UErrorCode errorCode=U_ZERO_ERROR; in UnicodeTest() local 36 unknownPropertyNames=new U_NAMESPACE_QUALIFIER Hashtable(errorCode); in UnicodeTest() 37 if(U_FAILURE(errorCode)) { in UnicodeTest() 43 unknownPropertyNames->puti(UnicodeString(ignorePropNames[i], -1, US_INV), 1, errorCode); in UnicodeTest() 178 UErrorCode errorCode=U_ZERO_ERROR; in derivedPropsLineFn() local 179 me->unknownPropertyNames->puti(propName, 1, errorCode); in derivedPropsLineFn() 210 UErrorCode errorCode=U_ZERO_ERROR; in TestAdditionalProperties() local 211 u_parseDelimitedFile(path, ';', fields, 2, derivedPropsLineFn, this, &errorCode); in TestAdditionalProperties() 212 if(U_FAILURE(errorCode)) { in TestAdditionalProperties() 213 errln("error parsing DerivedCoreProperties.txt: %s\n", u_errorName(errorCode)); in TestAdditionalProperties() [all …]
|
/external/icu/icu4c/source/common/ |
D | listformatter.cpp | 43 UErrorCode &errorCode) : in ListFormatInternal() 44 twoPattern(two, 2, 2, errorCode), in ListFormatInternal() 45 startPattern(start, 2, 2, errorCode), in ListFormatInternal() 46 middlePattern(middle, 2, 2, errorCode), in ListFormatInternal() 47 endPattern(end, 2, 2, errorCode) {} in ListFormatInternal() 49 ListFormatInternal(const ListFormatData &data, UErrorCode &errorCode) : in ListFormatInternal() 50 twoPattern(data.twoPattern, errorCode), in ListFormatInternal() 51 startPattern(data.startPattern, errorCode), in ListFormatInternal() 52 middlePattern(data.middlePattern, errorCode), in ListFormatInternal() 53 endPattern(data.endPattern, errorCode) { } in ListFormatInternal() [all …]
|
D | loadednormalizer2impl.cpp | 38 void load(const char *packageName, const char *name, UErrorCode &errorCode); 76 LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCode &errorCode) { in load() argument 77 if(U_FAILURE(errorCode)) { in load() 80 memory=udata_openChoice(packageName, "nrm", name, isAcceptable, this, &errorCode); in load() 81 if(U_FAILURE(errorCode)) { in load() 88 errorCode=U_INVALID_FORMAT_ERROR; // Not enough indexes. in load() 96 &errorCode); in load() 97 if(U_FAILURE(errorCode)) { in load() 117 UErrorCode &errorCode) { in createInstance() argument 118 if(U_FAILURE(errorCode)) { in createInstance() [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 | 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 | charstr.cpp | 25 CharString &CharString::copyFrom(const CharString &s, UErrorCode &errorCode) { in copyFrom() argument 26 if(U_SUCCESS(errorCode) && this!=&s && ensureCapacity(s.len+1, 0, errorCode)) { in copyFrom() 52 CharString &CharString::append(char c, UErrorCode &errorCode) { in append() argument 53 if(ensureCapacity(len+2, 0, errorCode)) { in append() 60 CharString &CharString::append(const char *s, int32_t sLength, UErrorCode &errorCode) { in append() argument 61 if(U_FAILURE(errorCode)) { in append() 65 errorCode=U_ILLEGAL_ARGUMENT_ERROR; in append() 76 errorCode=U_INTERNAL_PROGRAM_ERROR; in append() 85 return append(CharString(s, sLength, errorCode), errorCode); in append() 86 } else if(ensureCapacity(len+sLength+1, 0, errorCode)) { in append() [all …]
|
D | norm2allmodes.h | 39 UErrorCode &errorCode) const { in normalize() argument 40 if(U_FAILURE(errorCode)) { in normalize() 46 errorCode=U_ILLEGAL_ARGUMENT_ERROR; in normalize() 52 if(buffer.init(src.length(), errorCode)) { in normalize() 53 normalize(sArray, sArray+src.length(), buffer, errorCode); in normalize() 59 ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0; 65 UErrorCode &errorCode) const { in normalizeSecondAndAppend() argument 66 return normalizeSecondAndAppend(first, second, TRUE, errorCode); in normalizeSecondAndAppend() 71 UErrorCode &errorCode) const { in append() argument 72 return normalizeSecondAndAppend(first, second, FALSE, errorCode); in append() [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 …]
|