2 TOWCTRANS: wint_t towctrans (wint_t wc, wctrans_t desc);
5 #define TST_FUNCTION towctrans
7 #include "tsp_common.c"
8 #include "dat_towctrans.c"
12 tst_towctrans (FILE *fp
, int debug_flg
)
14 TST_DECL_VARS (wint_t);
22 TST_DO_TEST (towctrans
)
24 TST_HEAD_LOCALE (towctrans
, S_TOWCTRANS
);
25 TST_DO_REC (towctrans
)
27 TST_GET_ERRET (towctrans
);
28 wc
= TST_INPUT (towctrans
).wc
;
29 ts
= TST_INPUT (towctrans
).ts
;
32 if ((wto
= wctrans (ts
)) == (wctrans_t) 0)
35 result (fp
, C_IGNORED
, S_TOWCTRANS
, locale
, rec
+1, seq_num
+1, 3,
36 "Skip this data because the wctrans object is not invalid.");
40 wto
= &dummy
; /* not good ... */
44 fprintf (stdout
, "towctrans() ------ wctrans() returnd 0.\n");
52 ret
= towctrans (wc
, wto
);
57 fprintf (stdout
, "towctrans() [ %s : %d ] ret = 0x%x\n",
59 fprintf (stdout
, " errno = %d\n",
63 TST_IF_RETURN (S_TOWCTRANS
)
67 result (fp
, C_SUCCESS
, S_TOWCTRANS
, locale
, rec
+1,
68 seq_num
+1, 3, MS_PASSED
);
73 result (fp
, C_FAILURE
, S_TOWCTRANS
, locale
, rec
+1,
75 "the function returned 0, but should be non-zero");