]> git.ipfire.org Git - thirdparty/glibc.git/blame - localedata/tests-mbwc/dat_wcslen.c
iconv, localedef: avoid floating point rounding differences [BZ #24372]
[thirdparty/glibc.git] / localedata / tests-mbwc / dat_wcslen.c
CommitLineData
5b905722
AJ
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 *
5b905722
AJ
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
22TST_WCSLEN tst_wcslen_loc [] = {
23
24 { { Twcslen, TST_LOC_de },
25 {
26 { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 } }, /* #01 */
ec7956d9 27 /*expect*/ { 0,1,3, },
5b905722
AJ
28 },
29 { /*input.*/ { { 0x0000 } }, /* #02 */
ec7956d9 30 /*expect*/ { 0,1,0, },
5b905722 31 },
1cb990bc 32 { .is_last = 1 }
5b905722
AJ
33 }
34 },
35 { { Twcslen, TST_LOC_enUS },
36 {
37 { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 } }, /* #01 */
ec7956d9 38 /*expect*/ { 0,1,3, },
5b905722
AJ
39 },
40 { /*input.*/ { { 0x0000 } }, /* #02 */
ec7956d9 41 /*expect*/ { 0,1,0, },
5b905722 42 },
1cb990bc 43 { .is_last = 1 }
5b905722
AJ
44 }
45 },
46 { { Twcslen, TST_LOC_eucJP },
47 {
48 { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 } }, /* #01 */
ec7956d9 49 /*expect*/ { 0,1,3, },
5b905722
AJ
50 },
51 { /*input.*/ { { 0x0000 } }, /* #02 */
ec7956d9 52 /*expect*/ { 0,1,0, },
5b905722 53 },
1cb990bc 54 { .is_last = 1 }
5b905722
AJ
55 }
56 },
57 { { Twcslen, TST_LOC_end }}
58};