mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-7309 Add testcase for arabic shaping.
X-SVN-Rev: 27199
This commit is contained in:
parent
800da956b2
commit
98d44761c7
1 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2008, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/* file name: cbiditst.cpp
|
||||
|
@ -2180,6 +2180,8 @@ doArabicShapingTest(void) {
|
|||
0x661, 0x627, 0x32, 0x6f3, 0x61, 0x34, 0
|
||||
}, reverse_alen2an_init_al[]={
|
||||
0x6f1, 0x627, 0x32, 0x6f3, 0x61, 0x6f4, 0
|
||||
}, lamalef[]={
|
||||
0xfefb, 0
|
||||
};
|
||||
UChar dest[8];
|
||||
UErrorCode errorCode;
|
||||
|
@ -2340,6 +2342,16 @@ doArabicShapingTest(void) {
|
|||
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));
|
||||
}
|
||||
|
||||
errorCode=U_ZERO_ERROR;
|
||||
length=u_shapeArabic(lamalef, LENGTHOF(lamalef),
|
||||
dest, LENGTHOF(dest),
|
||||
U_SHAPE_LETTERS_UNSHAPE | U_SHAPE_LENGTH_GROW_SHRINK | U_SHAPE_TEXT_DIRECTION_VISUAL_LTR,
|
||||
&errorCode);
|
||||
if(U_FAILURE(errorCode) || length == LENGTHOF(lamalef)) {
|
||||
log_err("failure in u_shapeArabic(U_SHAPE_LETTERS_UNSHAPE | U_SHAPE_LENGTH_GROW_SHRINK | U_SHAPE_TEXT_DIRECTION_VISUAL_LTR)\n");
|
||||
log_err("returned %s instead of U_ZERO_ERROR or returned length %d instead of 3\n", u_errorName(errorCode), length);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue