From 0662741c4819f43fcfd3fa164444b5392a5e1b25 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Mon, 14 Aug 2000 23:07:32 +0000 Subject: [PATCH] ICU-471 add tests for bad arguments etc. for u_shapeArabic() X-SVN-Rev: 2229 --- icu4c/source/test/cintltst/cbiditst.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/icu4c/source/test/cintltst/cbiditst.c b/icu4c/source/test/cintltst/cbiditst.c index a637bc4095e..e07d3636fcb 100644 --- a/icu4c/source/test/cintltst/cbiditst.c +++ b/icu4c/source/test/cintltst/cbiditst.c @@ -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),