ICU-471 add tests for bad arguments etc. for u_shapeArabic()

X-SVN-Rev: 2229
This commit is contained in:
Markus Scherer 2000-08-14 23:07:32 +00:00
parent 9f63dce881
commit 0662741c48

View file

@ -720,6 +720,15 @@ doArabicShapingTest() {
log_err("failure in u_shapeArabic(U_SHAPE_DIGIT_TYPE_RESERVED), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
}
errorCode=U_ZERO_ERROR;
length=u_shapeArabic(source, LENGTHOF(source),
(UChar *)(source+2), LENGTHOF(dest), /* overlap source and destination */
U_SHAPE_DIGITS_EN2AN|U_SHAPE_DIGIT_TYPE_AN,
&errorCode);
if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
log_err("failure in u_shapeArabic(U_SHAPE_DIGIT_TYPE_RESERVED), returned %s instead of U_ILLEGAL_ARGUMENT_ERROR\n", u_errorName(errorCode));
}
/* test that letter shaping sets "unsupported" */
errorCode=U_ZERO_ERROR;
length=u_shapeArabic(source, LENGTHOF(source),