2 WCSCAT: wchar_t *wcscat (wchar_t *ws1, const wchar_t *ws2);
5 #define TST_FUNCTION wcscat
7 #include "tsp_common.c"
8 #include "dat_wcscat.c"
11 tst_wcscat (FILE * fp
, int debug_flg
)
13 TST_DECL_VARS (wchar_t *);
14 wchar_t *ws1
, *ws2
, *ws_ex
;
19 TST_HEAD_LOCALE (wcscat
, S_WCSCAT
);
22 TST_GET_ERRET (wcscat
);
23 ws1
= TST_INPUT (wcscat
).ws1
; /* external value: size WCSSIZE */
24 ws2
= TST_INPUT (wcscat
).ws2
;
27 ret
= wcscat (ws1
, ws2
);
30 TST_IF_RETURN (S_WCSCAT
)
34 Result (C_SUCCESS
, S_WCSCAT
, CASE_3
, MS_PASSED
);
39 Result (C_FAILURE
, S_WCSCAT
, CASE_3
,
40 "the return address may not be correct");
44 /* function specific test cases here */
48 ws_ex
= TST_EXPECT (wcscat
).ws
;
50 (ws1
[i
] != 0L || ws_ex
[i
] != 0L) && i
< WCSSIZE
; i
++)
54 fprintf (stdout
, "tst_wcscat() : ws1[%d] = 0x%lx\n", i
,
55 (unsigned long int) ws1
[i
]);
58 if (ws1
[i
] != ws_ex
[i
])
62 Result (C_FAILURE
, S_WCSCAT
, CASE_4
,
63 "concatinated string is different from an "
71 Result (C_SUCCESS
, S_WCSCAT
, CASE_4
, MS_PASSED
);