2 WCSTOD: double wcstod (wchar_t *np, const wchar_t **endp);
5 #define TST_FUNCTION wcstod
7 #include "tsp_common.c"
8 #include "dat_wcstod.c"
11 tst_wcstod (FILE * fp
, int debug_flg
)
13 TST_DECL_VARS (double);
14 wchar_t *np
, *endp
, fwc
;
19 TST_HEAD_LOCALE (wcstod
, S_WCSTOD
);
22 TST_GET_ERRET (wcstod
);
23 np
= TST_INPUT (wcstod
).np
;
26 ret
= wcstod (np
, &endp
);
31 fprintf (stdout
, "wcstod() [ %s : %d ] ret = %f\n", locale
,
33 fprintf (stdout
, " *endp = 0x%lx\n", *endp
);
36 TST_IF_RETURN (S_WCSTOD
)
40 val
= ret
- TST_EXPECT (wcstod
).val
;
41 if (TST_ABS (val
) < TST_DBL_EPS
)
43 Result (C_SUCCESS
, S_WCSTOD
, CASE_3
, MS_PASSED
);
48 Result (C_FAILURE
, S_WCSTOD
, CASE_3
, "return value is wrong");
53 fwc
= TST_EXPECT (wcstod
).fwc
;
57 Result (C_SUCCESS
, S_WCSTOD
, CASE_4
, MS_PASSED
);
62 Result (C_FAILURE
, S_WCSTOD
, CASE_4
, "a final wc is wrong.");