2.9
[glibc/nacl-glibc.git] / localedata / tests-mbwc / tst_wcswidth.c
blobc8369753e375d587ccef66e1099c24b587ba2f08
1 /*
2 WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n);
3 */
5 #define TST_FUNCTION wcswidth
7 #include "tsp_common.c"
8 #include "dat_wcswidth.c"
10 int
11 tst_wcswidth (FILE *fp, int debug_flg)
13 TST_DECL_VARS (int);
14 wchar_t *ws;
15 int n;
17 TST_DO_TEST (wcswidth)
19 TST_HEAD_LOCALE (wcswidth, S_WCSWIDTH);
20 TST_DO_REC (wcswidth)
22 TST_GET_ERRET (wcswidth);
23 ws = TST_INPUT (wcswidth).ws;
24 n = TST_INPUT (wcswidth).n;
25 ret = wcswidth (ws, n);
27 if (debug_flg)
29 fprintf (stderr, "wcswidth: [ %d ] : ret = %d\n", rec + 1, ret);
32 TST_IF_RETURN (S_WCSWIDTH)
38 return err_count;