]>
Commit | Line | Data |
---|---|---|
5b905722 AJ |
1 | /* |
2 | WCTYPE: wctype_t wctype (const char *class); | |
3 | */ | |
4 | ||
5 | ||
6 | #define TST_FUNCTION wctype | |
7 | ||
8 | #include "tsp_common.c" | |
9 | #include "dat_wctype.c" | |
10 | ||
11 | int | |
12 | tst_wctype (FILE * fp, int debug_flg) | |
13 | { | |
14 | TST_DECL_VARS (wctype_t); | |
15 | char *class; | |
16 | ||
17 | TST_DO_TEST (wctype) | |
18 | { | |
19 | TST_HEAD_LOCALE (wctype, S_WCTYPE); | |
20 | TST_DO_REC (wctype) | |
21 | { | |
22 | TST_GET_ERRET (wctype); | |
23 | class = TST_INPUT (wctype).class; | |
24 | ret = wctype (class); | |
25 | ||
26 | if (debug_flg) | |
27 | { | |
0e16ecfa | 28 | fprintf (stderr, "tst_wctype : [ %d ] ret = %ld\n", rec + 1, ret); |
5b905722 AJ |
29 | } |
30 | ||
31 | TST_IF_RETURN (S_WCTYPE) | |
32 | { | |
33 | if (ret != 0) | |
34 | { | |
35 | Result (C_SUCCESS, S_WCTYPE, CASE_3, MS_PASSED); | |
36 | } | |
37 | else | |
38 | { | |
39 | err_count++; | |
40 | Result (C_FAILURE, S_WCTYPE, CASE_3, | |
41 | "should return non-0, but returned 0"); | |
42 | } | |
43 | } | |
44 | } | |
45 | } | |
46 | ||
47 | return err_count; | |
48 | } |