blob: 594682ce9dfe0e89851dc701ab363c203c0bc797 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*
2 WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2);
3*/
4
5#define TST_FUNCTION wcscmp
6
7#include "tsp_common.c"
8#include "dat_wcscmp.c"
9
10
11int
12tst_wcscmp (FILE * fp, int debug_flg)
13{
14 TST_DECL_VARS (int);
15 wchar_t *ws1, *ws2;
16
17 TST_DO_TEST (wcscmp)
18 {
19 TST_HEAD_LOCALE (wcscmp, S_WCSCMP);
20 TST_DO_REC (wcscmp)
21 {
22 TST_GET_ERRET (wcscmp);
23 ws1 = TST_INPUT (wcscmp).ws1;
24 ws2 = TST_INPUT (wcscmp).ws2;
25 ret = wcscmp (ws1, ws2);
26 ret = (ret > 0 ? 1 : ret < 0 ? -1 : 0);
27
28 if (debug_flg)
29 {
30 fprintf (stderr, "tst_wcscmp: ret = %d\n", ret);
31 }
32
33 TST_IF_RETURN (S_WCSCMP)
34 {
35 };
36 }
37 }
38
39 return err_count;
40}