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",
34 (unsigned long int) *endp
);
37 TST_IF_RETURN (S_WCSTOD
)
41 val
= ret
- TST_EXPECT (wcstod
).val
;
42 if (TST_ABS (val
) < TST_DBL_EPS
)
44 Result (C_SUCCESS
, S_WCSTOD
, CASE_3
, MS_PASSED
);
49 Result (C_FAILURE
, S_WCSTOD
, CASE_3
, "return value is wrong");
54 fwc
= TST_EXPECT (wcstod
).fwc
;
58 Result (C_SUCCESS
, S_WCSTOD
, CASE_4
, MS_PASSED
);
63 Result (C_FAILURE
, S_WCSTOD
, CASE_4
, "a final wc is wrong.");