2 * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
4 * FILE: dat_towctrans.c
6 * TOWCTRANS: wint_t towctrans (wint_t wc, wctrans_t charclass);
12 #include "tst_types.h"
13 #include "tgn_locdef.h"
17 * Set ret_flg = 1, when a return value is expected to be 0 (FALSE).
18 * Set ret_flg = 0, when a return value is expected to be non-zero (TRUE).
20 * Since the functions return *non*-zero value for TRUE, can't
21 * compare an actual return value with an expected return value.
22 * Set the ret_flg=0 for TRUE cases and the tst_isw*() will check
25 * { { WEOF }, { 0,0,1,0 } },
27 * | ret_val: an expected return value
28 * ret_flg: if 1, compare an actual return value with the
29 * ret_val; if 0, the test program checks
30 * the actual return value.
32 * CAUTION: if a charclass is invalid, the test function gives
33 * towctrans() an invalid wctrans object instead of a return value
34 * from wctrans() which is supposed to be 0.
37 TST_TOWCTRANS tst_towctrans_loc
[] = {
39 { Ttowctrans
, TST_LOC_C
},
42 { { 0x0010, "xxxxxxx" }, { EINVAL
,1,0x0010 } },
44 { { 0x0010, "xxxxxxx" }, { 0, 1,0x0010 } },
46 { { 0x007F, "tolower" }, { 0, 1,0x007F } },
47 { { 0x0061, "toupper" }, { 0, 1,0x0041 } },
48 { { 0x0041, "tolower" }, { 0, 1,0x0061 } },
53 { Ttowctrans
, TST_LOC_de
},
56 { { 0x0010, "tojkata" }, { EINVAL
,1,0x0010 } },
58 { { 0x0010, "tojkata" }, { 0, 1,0x0010 } },
60 { { 0x0080, "tolower" }, { 0, 1,0x0080 } },
61 { { 0x00EC, "toupper" }, { 0, 1,0x00CC } },
62 { { 0x00CC, "tolower" }, { 0, 1,0x00EC } },
67 { Ttowctrans
, TST_LOC_enUS
},
70 { { 0x0010, "xxxxxxx" }, { EINVAL
,1,0x0010 } },
72 { { 0x0010, "xxxxxxx" }, { 0, 1,0x0010 } },
74 { { 0x007F, "tolower" }, { 0, 1,0x007F } },
75 { { 0x0061, "toupper" }, { 0, 1,0x0041 } },
76 { { 0x0041, "tolower" }, { 0, 1,0x0061 } },
81 { Ttowctrans
, TST_LOC_eucJP
},
83 { { 0xFF21, "tolower" }, { 0, 1,0xFF41 } },
84 { { 0xFF41, "toupper" }, { 0, 1,0xFF21 } },
85 { { 0x30A1, "tojhira" }, { 0, 1,0x3041 } },
86 { { 0x3041, "tojkata" }, { 0, 1,0x30A1 } },
91 { Ttowctrans
, TST_LOC_end
}