Lines Matching refs:errorCode
12 #include "unicode/errorcode.h"
802 UErrorCode errorCode;
821 errorCode=U_ZERO_ERROR;
823 r=Normalizer::concatenate(left, right, result, mode, 0, errorCode);
824 if(U_FAILURE(errorCode) || /*result!=r ||*/ result!=expect) {
826 UnicodeString(u_errorName(errorCode))+", result==expect: expected: "+
835 errorCode=U_UNEXPECTED_TOKEN;
836 r=Normalizer::concatenate(left, right, result, mode, 0, errorCode);
837 if(errorCode!=U_UNEXPECTED_TOKEN || result!=r || !result.isBogus()) {
842 errorCode=U_ZERO_ERROR;
843 r=Normalizer::concatenate(left, right, result, mode, 0, errorCode);
844 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || result!=r || !result.isBogus()) {
851 ref_norm_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t options, UErrorCode &errorCode) {
856 Normalizer::decompose(s1, FALSE, normOptions, r1, errorCode);
857 Normalizer::decompose(s2, FALSE, normOptions, r2, errorCode);
866 Normalizer::decompose(r1, FALSE, normOptions, t1, errorCode);
867 Normalizer::decompose(r2, FALSE, normOptions, t2, errorCode);
878 _norm_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t options, UErrorCode &errorCode) {
881 if( UNORM_YES==Normalizer::quickCheck(s1, UNORM_FCD, normOptions, errorCode) &&
882 UNORM_YES==Normalizer::quickCheck(s2, UNORM_FCD, normOptions, errorCode)) {
886 return Normalizer::compare(s1, s2, options, errorCode);
1070 UErrorCode errorCode;
1082 errorCode=U_ZERO_ERROR;
1083 result=_norm_compare(s[i], s[j], opt[k].options, errorCode);
1084 refResult=ref_norm_compare(s[i], s[j], opt[k].options, errorCode);
1088 U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
1093 errorCode=U_ZERO_ERROR;
1099 U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
1112 const Normalizer2Impl *nfcImpl=Normalizer2Factory::getNFCImpl(errorCode);
1113 if(U_FAILURE(errorCode) || !nfcImpl->ensureCanonIterData(errorCode)) {
1115 u_errorName(errorCode));
1127 const Normalizer2 *nfcNorm2=Normalizer2Factory::getNFCInstance(errorCode);
1139 errorCode=U_ZERO_ERROR;
1140 result=_norm_compare(s1, s2, opt[k].options, errorCode);
1141 refResult=ref_norm_compare(s1, s2, opt[k].options, errorCode);
1145 U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
1150 errorCode=U_ZERO_ERROR;
1156 U_SUCCESS(errorCode) ? "" : u_errorName(errorCode));
1188 UnicodeSet filter(UNICODE_STRING_SIMPLE("[^\\u00a0-\\u00ff]"), errorCode);
1221 UErrorCode errorCode;
1227 errorCode = U_ZERO_ERROR;
1253 Normalizer::decompose(s, FALSE, 0, d, errorCode);
1260 Normalizer::decompose(s, FALSE, 0, d, errorCode);
1264 qcResult=Normalizer::quickCheck(s, UNORM_FCD, errorCode);
1266 if (U_FAILURE(errorCode)) {
1268 dataerrln("U+%04lx: Failed with error %s", u_errorName(errorCode));
1288 if(isNFD && UNORM_YES!=Normalizer::quickCheck(s, UNORM_NFD, errorCode)) {
1317 initExpectedSkippables(UnicodeSet skipSets[UNORM_MODE_COUNT], UErrorCode &errorCode) {
1319 UNICODE_STRING_SIMPLE("[[:NFD_QC=Yes:]&[:ccc=0:]]"), errorCode);
1321 UNICODE_STRING_SIMPLE("[[:NFC_QC=Yes:]&[:ccc=0:]-[:HST=LV:]]"), errorCode);
1323 UNICODE_STRING_SIMPLE("[[:NFKD_QC=Yes:]&[:ccc=0:]]"), errorCode);
1325 UNICODE_STRING_SIMPLE("[[:NFKC_QC=Yes:]&[:ccc=0:]-[:HST=LV:]]"), errorCode);
1330 UnicodeSet combineBack("[:NFC_QC=Maybe:]", errorCode);
1343 UnicodeSet notInteresting("[[:C:][:Unified_Ideograph:][:HST=LVT:]]", errorCode);
1349 const Normalizer2 *norm2=Normalizer2::getNFCInstance(errorCode);
1364 if(!norm2->isNormalized(s, errorCode)) {
1383 IcuTestErrorCode errorCode(*this, "TestSkippable");
1384 skipSets[UNORM_NFD].applyPattern(UNICODE_STRING_SIMPLE("[:NFD_Inert:]"), errorCode);
1385 skipSets[UNORM_NFKD].applyPattern(UNICODE_STRING_SIMPLE("[:NFKD_Inert:]"), errorCode);
1386 skipSets[UNORM_NFC].applyPattern(UNICODE_STRING_SIMPLE("[:NFC_Inert:]"), errorCode);
1387 skipSets[UNORM_NFKC].applyPattern(UNICODE_STRING_SIMPLE("[:NFKC_Inert:]"), errorCode);
1388 if(errorCode.logDataIfFailureAndReset("UnicodeSet(NF..._Inert) failed")) {
1393 initExpectedSkippables(expectSets, errorCode);
1394 errorCode.assertSuccess();
1434 IcuTestErrorCode errorCode(*this, "BasicNormalizerTest/TestCustomComp");
1436 Normalizer2::getInstance(loadTestData(errorCode), "testnorm",
1437 UNORM2_COMPOSE, errorCode);
1438 if(errorCode.logDataIfFailureAndReset("unable to load testdata/testnorm.nrm")) {
1445 UnicodeString result=customNorm2->normalize(input, errorCode);
1466 IcuTestErrorCode errorCode(*this, "BasicNormalizerTest/TestCustomFCC");
1468 Normalizer2::getInstance(loadTestData(errorCode), "testnorm",
1469 UNORM2_COMPOSE_CONTIGUOUS, errorCode);
1470 if(errorCode.logDataIfFailureAndReset("unable to load testdata/testnorm.nrm")) {
1477 UnicodeString result=customNorm2->normalize(input, errorCode);
1487 UErrorCode errorCode = U_ZERO_ERROR;
1488 const Normalizer2 *nfcNorm2=Normalizer2Factory::getNFCInstance(errorCode);
1489 if (U_FAILURE(errorCode)) {
1493 UnicodeSet filter(UNICODE_STRING_SIMPLE("[^\\u00a0-\\u00ff\\u0310-\\u031f]"), errorCode);
1520 fn2.append(newString1, newString2, errorCode);
1521 if (U_FAILURE(errorCode)) {