1 | /* |
2 | * TEST SUITE FOR MB/WC FUNCTIONS IN CLIBRARY |
3 | * |
4 | * FILE: dat_wcslen.c |
5 | * |
6 | * WCSLEN: size_t wcslen (const wchar_t *ws); |
7 | */ |
8 | |
9 | |
10 | /* |
11 | * NOTE: |
12 | * |
13 | * a header in each expected data: |
14 | * |
15 | * int err_val; ... expected value for errno |
16 | * <typ> ret_flg; ... set ret_flg=1 to compare an expected |
17 | * value with an actual value |
18 | * <typ> ret_val; ... expected value for return |
19 | */ |
20 | |
21 | |
22 | TST_WCSLEN tst_wcslen_loc [] = { |
23 | |
24 | { { Twcslen, TST_LOC_de }, |
25 | { |
26 | { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 } }, /* #01 */ |
27 | /*expect*/ { 0,1,3, }, |
28 | }, |
29 | { /*input.*/ { { 0x0000 } }, /* #02 */ |
30 | /*expect*/ { 0,1,0, }, |
31 | }, |
32 | { .is_last = 1 } |
33 | } |
34 | }, |
35 | { { Twcslen, TST_LOC_enUS }, |
36 | { |
37 | { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 } }, /* #01 */ |
38 | /*expect*/ { 0,1,3, }, |
39 | }, |
40 | { /*input.*/ { { 0x0000 } }, /* #02 */ |
41 | /*expect*/ { 0,1,0, }, |
42 | }, |
43 | { .is_last = 1 } |
44 | } |
45 | }, |
46 | { { Twcslen, TST_LOC_eucJP }, |
47 | { |
48 | { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 } }, /* #01 */ |
49 | /*expect*/ { 0,1,3, }, |
50 | }, |
51 | { /*input.*/ { { 0x0000 } }, /* #02 */ |
52 | /*expect*/ { 0,1,0, }, |
53 | }, |
54 | { .is_last = 1 } |
55 | } |
56 | }, |
57 | { { Twcslen, TST_LOC_end }} |
58 | }; |
59 | |