Home
last modified time | relevance | path

Searched refs:errorCode (Results 1 – 25 of 666) sorted by relevance

12345678910>>...27

/external/icu/icu4c/source/test/cintltst/
Dcstrcase.c45 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 …]
Dcnormtst.c555 UErrorCode errorCode; in TestIsNormalized() local
560 errorCode=U_ZERO_ERROR; in TestIsNormalized()
561 if(!unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode) || U_FAILURE(errorCode)) { in TestIsNormalized()
562 …rr("error: !isNormalized(<U+0300>, NFC) (%s) - (Are you missing data?)\n", u_errorName(errorCode)); in TestIsNormalized()
566 errorCode=U_TRUNCATED_CHAR_FOUND; in TestIsNormalized()
567 (void)unorm_isNormalized(notNFC[0]+2, 1, UNORM_NFC, &errorCode); in TestIsNormalized()
568 if(errorCode!=U_TRUNCATED_CHAR_FOUND) { in TestIsNormalized()
569 …ror: isNormalized(U_TRUNCATED_CHAR_FOUND) changed the error code to %s\n", u_errorName(errorCode)); in TestIsNormalized()
573 errorCode=U_ZERO_ERROR; in TestIsNormalized()
574 (void)unorm_isNormalized(NULL, 1, UNORM_NFC, &errorCode); in TestIsNormalized()
[all …]
Dtrie2test.c522 UErrorCode errorCode; in testFrozenTrie() local
536 errorCode=U_ZERO_ERROR; in testFrozenTrie()
538 utrie2_set32(trie, 1, 234, &errorCode); in testFrozenTrie()
540 if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) { in testFrozenTrie()
542 testName, u_errorName(errorCode)); in testFrozenTrie()
546 errorCode=U_ZERO_ERROR; in testFrozenTrie()
547 utrie2_setRange32(trie, 1, 5, 234, TRUE, &errorCode); in testFrozenTrie()
549 if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) { in testFrozenTrie()
551 testName, u_errorName(errorCode)); in testFrozenTrie()
555 errorCode=U_ZERO_ERROR; in testFrozenTrie()
[all …]
Dcustrtrn.c891 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 …]
/external/icu/icu4c/source/i18n/
Ducol_res.cpp82 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 …]
Ddayperiodrules.cpp53 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 …]
Dcollationruleparser.cpp58 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 …]
Dlistformatter.cpp47 PatternHandler(const UnicodeString& two, const UnicodeString& end, UErrorCode& errorCode) : in PatternHandler() argument
48 twoPattern(two, 2, 2, errorCode), in PatternHandler()
49 endPattern(end, 2, 2, errorCode) { } in PatternHandler()
84 UErrorCode& errorCode) : in ContextualHandler() argument
85 PatternHandler(elseTwo, elseEnd, errorCode), in ContextualHandler()
87 thenTwoPattern(thenTwo, 2, 2, errorCode), in ContextualHandler()
88 thenEndPattern(thenEnd, 2, 2, errorCode) { } in ContextualHandler()
227 UErrorCode &errorCode) : in ListFormatInternal()
228 startPattern(start, 2, 2, errorCode), in ListFormatInternal()
229 middlePattern(middle, 2, 2, errorCode), in ListFormatInternal()
[all …]
Drulebasedcollator.cpp154 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 …]
Dcollationbuilder.cpp62 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 …]
Dcollationdatabuilder.cpp137 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 …]
Dcollationiterator.cpp37 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/
Dlocalematchertest.cpp70 UBool dataDriven(const TestCase &test, IcuTestErrorCode &errorCode);
98 IcuTestErrorCode errorCode(*this, "testEmpty"); in testEmpty() local
99 LocaleMatcher matcher = LocaleMatcher::Builder().build(errorCode); in testEmpty()
100 const Locale *best = matcher.getBestMatch(Locale::getFrench(), errorCode); in testEmpty()
102 LocaleMatcher::Result result = matcher.getBestMatchResult("fr", errorCode); in testEmpty()
112 IcuTestErrorCode errorCode(*this, "testCopyErrorTo"); in testCopyErrorTo() local
125 IcuTestErrorCode errorCode(*this, "testBasics"); in testBasics() local
129 setSupportedLocales(ARRAY_RANGE(locales)).build(errorCode); in testBasics()
130 const Locale *best = matcher.getBestMatch("en_GB", errorCode); in testBasics()
132 best = matcher.getBestMatch("en_US", errorCode); in testBasics()
[all …]
Ditutil.cpp100 ErrorCode errorCode; in TestErrorCode() local
101 if(errorCode.get()!=U_ZERO_ERROR || !errorCode.isSuccess() || errorCode.isFailure()) { in TestErrorCode()
105 errorCode.assertSuccess(); in TestErrorCode()
106 if(errorCode.errorName()!=u_errorName(U_ZERO_ERROR)) { in TestErrorCode()
109 RefPlusOne(errorCode); in TestErrorCode()
110 … if(errorCode.get()!=U_ILLEGAL_ARGUMENT_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode()
113 PtrPlusTwo(errorCode); in TestErrorCode()
114 if(errorCode.get()!=U_INVALID_FORMAT_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode()
117 errorCode.set(U_PARSE_ERROR); in TestErrorCode()
118 if(errorCode.get()!=U_PARSE_ERROR || errorCode.isSuccess() || !errorCode.isFailure()) { in TestErrorCode()
[all …]
Dcollationtest.cpp100 UBool readNonEmptyLine(UCHARBUF *f, IcuTestErrorCode &errorCode);
101 … void parseString(int32_t &start, UnicodeString &prefix, UnicodeString &s, UErrorCode &errorCode);
102 Collation::Level parseRelationAndString(UnicodeString &s, IcuTestErrorCode &errorCode);
103 void parseAndSetAttribute(IcuTestErrorCode &errorCode);
104 void parseAndSetReorderCodes(int32_t start, IcuTestErrorCode &errorCode);
105 void buildTailoring(UCHARBUF *f, IcuTestErrorCode &errorCode);
106 void setRootCollator(IcuTestErrorCode &errorCode);
107 void setLocaleCollator(IcuTestErrorCode &errorCode);
109 UBool needsNormalization(const UnicodeString &s, UErrorCode &errorCode) const;
113 IcuTestErrorCode &errorCode);
[all …]
Dconvtest.cpp56 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()
98 UErrorCode errorCode; in TestToUnicode() local
101 errorCode=U_ZERO_ERROR; in TestToUnicode()
102 dataModule=TestDataModule::getTestDataModule("conversion", *this, errorCode); in TestToUnicode()
103 if(U_SUCCESS(errorCode)) { in TestToUnicode()
104 testData=dataModule->createTestData("toUnicode", errorCode); in TestToUnicode()
105 if(U_SUCCESS(errorCode)) { in TestToUnicode()
[all …]
/external/icu/icu4c/source/common/
Dloadednormalizer2impl.cpp39 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 …]
Dnorm2allmodes.h41 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 …]
Dlocresdata.cpp53 UErrorCode errorCode; in uloc_getTableStringWithFallback() local
60 errorCode=U_ZERO_ERROR; in uloc_getTableStringWithFallback()
61 icu::LocalUResourceBundlePointer rb(ures_open(path, locale, &errorCode)); in uloc_getTableStringWithFallback()
63 if(U_FAILURE(errorCode)) { in uloc_getTableStringWithFallback()
65 *pErrorCode=errorCode; in uloc_getTableStringWithFallback()
67 } else if(errorCode==U_USING_DEFAULT_WARNING || in uloc_getTableStringWithFallback()
68 (errorCode==U_USING_FALLBACK_WARNING && *pErrorCode!=U_USING_DEFAULT_WARNING) in uloc_getTableStringWithFallback()
71 *pErrorCode=errorCode; in uloc_getTableStringWithFallback()
77 ures_getByKeyWithFallback(rb.getAlias(), tableKey, table.getAlias(), &errorCode); in uloc_getTableStringWithFallback()
89 ures_getByKeyWithFallback(table.getAlias(), subTableKey, table.getAlias(), &errorCode); in uloc_getTableStringWithFallback()
[all …]
Dcharacterproperties.cpp90 void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { in initInclusion() argument
94 errorCode = U_INTERNAL_PROGRAM_ERROR; in initInclusion()
101 errorCode = U_MEMORY_ALLOCATION_ERROR; in initInclusion()
115 uchar_addPropertyStarts(&sa, &errorCode); in initInclusion()
118 upropsvec_addPropertyStarts(&sa, &errorCode); in initInclusion()
121 uchar_addPropertyStarts(&sa, &errorCode); in initInclusion()
122 upropsvec_addPropertyStarts(&sa, &errorCode); in initInclusion()
126 const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(errorCode); in initInclusion()
127 if(U_SUCCESS(errorCode)) { in initInclusion()
128 impl->addPropertyStarts(&sa, errorCode); in initInclusion()
[all …]
Dcharstr.cpp39 char *CharString::cloneData(UErrorCode &errorCode) const { in cloneData()
40 if (U_FAILURE(errorCode)) { return nullptr; } in cloneData()
43 errorCode = U_MEMORY_ALLOCATION_ERROR; in cloneData()
50 int32_t CharString::extract(char *dest, int32_t capacity, UErrorCode &errorCode) const { in extract()
51 if (U_FAILURE(errorCode)) { return len; } in extract()
53 errorCode = U_ILLEGAL_ARGUMENT_ERROR; in extract()
60 return u_terminateChars(dest, capacity, len, &errorCode); in extract()
63 CharString &CharString::copyFrom(const CharString &s, UErrorCode &errorCode) { in copyFrom() argument
64 if(U_SUCCESS(errorCode) && this!=&s && ensureCapacity(s.len+1, 0, errorCode)) { in copyFrom()
102 CharString &CharString::append(char c, UErrorCode &errorCode) { in append() argument
[all …]
Dmessagepattern.cpp96 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 …]
Dfilterednormalizer2.cpp38 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 …]
/external/icu/libicu/cts_headers/
Dnorm2allmodes.h41 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 …]
/external/icu/icu4c/source/test/iotest/
Diotest.cpp200 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 …]

12345678910>>...27