Lines Matching refs:errorCode
384 UErrorCode errorCode=U_ZERO_ERROR; in TestUScriptCodeAPI() local
386 USCRIPT_COMMON==uscript_getScript(0x0640, &errorCode) && in TestUScriptCodeAPI()
387 USCRIPT_INHERITED==uscript_getScript(0x0650, &errorCode) && in TestUScriptCodeAPI()
388 USCRIPT_ARABIC==uscript_getScript(0xfdf2, &errorCode)) || in TestUScriptCodeAPI()
389 U_FAILURE(errorCode) in TestUScriptCodeAPI()
446 UErrorCode errorCode; in TestGetScriptExtensions() local
449 errorCode=U_PARSE_ERROR; in TestGetScriptExtensions()
450 length=uscript_getScriptExtensions(0x0640, scripts, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
451 if(errorCode!=U_PARSE_ERROR) { in TestGetScriptExtensions()
453 u_errorName(errorCode)); in TestGetScriptExtensions()
455 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
456 length=uscript_getScriptExtensions(0x0640, NULL, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
457 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) { in TestGetScriptExtensions()
459 u_errorName(errorCode)); in TestGetScriptExtensions()
461 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
462 length=uscript_getScriptExtensions(0x0640, scripts, -1, &errorCode); in TestGetScriptExtensions()
463 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) { in TestGetScriptExtensions()
465 u_errorName(errorCode)); in TestGetScriptExtensions()
467 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
468 length=uscript_getScriptExtensions(0x0640, scripts, 0, &errorCode); in TestGetScriptExtensions()
469 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=3) { in TestGetScriptExtensions()
471 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
473 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
474 length=uscript_getScriptExtensions(0x0640, scripts, 1, &errorCode); in TestGetScriptExtensions()
475 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=3) { in TestGetScriptExtensions()
477 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
480 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
481 length=uscript_getScriptExtensions(0x063f, scripts, 0, &errorCode); in TestGetScriptExtensions()
482 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=1) { in TestGetScriptExtensions()
484 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
488 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
489 length=uscript_getScriptExtensions(-1, scripts, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
490 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_UNKNOWN) { in TestGetScriptExtensions()
492 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
494 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
495 length=uscript_getScriptExtensions(0x110000, scripts, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
496 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_UNKNOWN) { in TestGetScriptExtensions()
498 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
502 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
503 length=uscript_getScriptExtensions(0x063f, scripts, 1, &errorCode); in TestGetScriptExtensions()
504 if(U_FAILURE(errorCode) || length!=1 || scripts[0]!=USCRIPT_ARABIC) { in TestGetScriptExtensions()
506 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
508 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
509 length=uscript_getScriptExtensions(0x0640, scripts, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
510 if(U_FAILURE(errorCode) || length!=3 || in TestGetScriptExtensions()
514 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
516 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
517 length=uscript_getScriptExtensions(0xfdf2, scripts, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
518 …if(U_FAILURE(errorCode) || length!=2 || scripts[0]!=USCRIPT_ARABIC || scripts[1]!=USCRIPT_THAANA) { in TestGetScriptExtensions()
520 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
522 errorCode=U_ZERO_ERROR; in TestGetScriptExtensions()
523 length=uscript_getScriptExtensions(0xff65, scripts, LENGTHOF(scripts), &errorCode); in TestGetScriptExtensions()
524 … if(U_FAILURE(errorCode) || length!=6 || scripts[0]!=USCRIPT_BOPOMOFO || scripts[5]!=USCRIPT_YI) { in TestGetScriptExtensions()
526 (int)length, u_errorName(errorCode)); in TestGetScriptExtensions()
532 UErrorCode errorCode=U_ZERO_ERROR; in TestScriptMetadataAPI() local
535 if(uscript_getSampleString(USCRIPT_LATIN, sample, LENGTHOF(sample), &errorCode)!=1 || in TestScriptMetadataAPI()
536 U_FAILURE(errorCode) || in TestScriptMetadataAPI()
537 uscript_getScript(sample[0], &errorCode)!=USCRIPT_LATIN || in TestScriptMetadataAPI()
539 log_err("uscript_getSampleString(Latn) failed - %s\n", u_errorName(errorCode)); in TestScriptMetadataAPI()
542 if(uscript_getSampleString(USCRIPT_LATIN, sample, 0, &errorCode)!=1 || in TestScriptMetadataAPI()
543 errorCode!=U_BUFFER_OVERFLOW_ERROR || in TestScriptMetadataAPI()
545 log_err("uscript_getSampleString(Latn, capacity=0) failed - %s\n", u_errorName(errorCode)); in TestScriptMetadataAPI()
547 errorCode=U_ZERO_ERROR; in TestScriptMetadataAPI()
548 if(uscript_getSampleString(USCRIPT_INVALID_CODE, sample, LENGTHOF(sample), &errorCode)!=0 || in TestScriptMetadataAPI()
549 U_FAILURE(errorCode) || in TestScriptMetadataAPI()
551 log_err("uscript_getSampleString(invalid) failed - %s\n", u_errorName(errorCode)); in TestScriptMetadataAPI()
554 if(uscript_getSampleString(USCRIPT_CODE_LIMIT, sample, 0, &errorCode)!=0 || in TestScriptMetadataAPI()
555 errorCode!=U_STRING_NOT_TERMINATED_WARNING || in TestScriptMetadataAPI()
557 log_err("uscript_getSampleString(limit, capacity=0) failed - %s\n", u_errorName(errorCode)); in TestScriptMetadataAPI()