initial commit
[glibc.git] / localedata / tests-mbwc / tst_wctob.c
1 /*-------------------------------------------------------------------------------------*/
2 /* WCTOB: int wctob( wint_t wc ) */
3 /*-------------------------------------------------------------------------------------*/
4
5 #define TST_FUNCTION wctob
6
7 #include "tsp_common.c"
8 #include "dat_wctob.c"
9
10 int
11 tst_wctob (FILE * fp, int debug_flg)
12 {
13 TST_DECL_VARS (int);
14 wchar_t wc;
15
16 TST_DO_TEST (wctob)
17 {
18 TST_HEAD_LOCALE (wctob, S_WCTOB);
19 TST_DO_REC (wctob)
20 {
21 TST_GET_ERRET (wctob);
22 wc = TST_INPUT (wctob).wc;
23 ret = wctob (wc);
24
25 if (debug_flg)
26 {
27 fprintf (stderr, "tst_wctob : [ %d ] ret = %d\n", rec + 1, ret);
28 }
29
30 TST_IF_RETURN (S_WCTOB)
31 {
32 };
33 }
34 }
35
36 return err_count;
37 }