U0000 is not in class cntrl.
[kopensolaris-gnu/glibc.git] / localedata / tests-mbwc / dat_wcscmp.c
1 /*
2  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
3  *
4  *       FILE: dat_wcscmp.c
5  *
6  *       WCSCMP:  int  wcscmp (const wchar_t *ws1, const wchar_t *ws2);
7  */
8
9 /* NOTE:
10         This is not a locale sensitive function and
11         it may not make sence testing it for each locale ...
12 */
13
14
15 TST_WCSCMP tst_wcscmp_loc [] = {
16   {
17     { Twcscmp, TST_LOC_de },
18     {
19       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
20                      { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #1 */
21         /*expect*/ { 0,0,1,0,                     },
22       },
23       { /*input.*/ { { 0x0000,0x00D1,0x00D3,0x0000 },
24                      { 0x0000,0x00D2,0x00D3,0x0000 }, },  /* #2 */
25         /*expect*/ { 0,0,1,0,                     },
26       },
27       { /*input.*/ { { 0x00D1,0x00D1,0x00D3,0x0000 },
28                      { 0x0000,0x00D2,0x00D3,0x0000 }, },  /* #3 */
29         /*expect*/ { 0,0,1,0x00D1,                        },
30       },
31       { /*input.*/ { { 0x0000,0x00D2,0x00D3,0x0000 },
32                      { 0x00D1,0x00D1,0x00D3,0x0000 }, },  /* #4 */
33         /*expect*/ { 0,0,1,-0x00D1,                       },
34       },
35       { /*input.*/ { { 0x00D1,0x00D5,0x00D3,0x0000 },
36                      { 0x00D1,0x00D2,0x00D3,0x0000 }, },  /* #5 */
37         /*expect*/ { 0,0,1,3,                     },
38       },
39       { /*input.*/ { { 0x00D1,0x00D2,0x00D3,0x0000 },
40                      { 0x00D1,0x00D2,0x00D9,0x0000 }, },  /* #6 */
41         /*expect*/ { 0,0,1,-6,                    },
42       },
43       { /*input.*/ { { 0x00D1,0x00D2,0x0000            },
44                      { 0x00D1,0x00D2,0x00D9,0x0000 }, },  /* #7 */
45         /*expect*/ { 0,0,1,-0x00D9,                       },
46       },
47       { /*input.*/ { { 0x00D1,0x00D2,0x00D9,0x0000 },
48                      { 0x00D1,0x00D2,0x0000            }, },  /* #8 */
49         /*expect*/ { 0,0,1,0x00D9,                        },
50       },
51       { is_last: 1 }
52     }
53   },
54   {
55     { Twcscmp, TST_LOC_enUS },
56     {
57       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
58                      { 0x0041,0x0042,0x0043,0x0000 }, },  /* #1 */
59         /*expect*/ { 0,0,1,0,                     },
60       },
61       { /*input.*/ { { 0x0000,0x0041,0x0043,0x0000 },
62                      { 0x0000,0x0042,0x0043,0x0000 }, },  /* #2 */
63         /*expect*/ { 0,0,1,0,                     },
64       },
65       { /*input.*/ { { 0x0041,0x0041,0x0043,0x0000 },
66                      { 0x0000,0x0042,0x0043,0x0000 }, },  /* #3 */
67         /*expect*/ { 0,0,1,0x0041,                        },
68       },
69       { /*input.*/ { { 0x0000,0x0042,0x0043,0x0000 },
70                      { 0x0041,0x0041,0x0043,0x0000 }, },  /* #4 */
71         /*expect*/ { 0,0,1,-0x0041,                       },
72       },
73       { /*input.*/ { { 0x0041,0x0045,0x0043,0x0000 },
74                      { 0x0041,0x0042,0x0043,0x0000 }, },  /* #5 */
75         /*expect*/ { 0,0,1,3,                     },
76       },
77       { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },
78                      { 0x0041,0x0042,0x0049,0x0000 }, },  /* #6 */
79         /*expect*/ { 0,0,1,-6,                    },
80       },
81       { /*input.*/ { { 0x0041,0x0042,0x0000            },
82                      { 0x0041,0x0042,0x0049,0x0000 }, },  /* #7 */
83         /*expect*/ { 0,0,1,-0x0049,                       },
84       },
85       { /*input.*/ { { 0x0041,0x0042,0x0049,0x0000 },
86                      { 0x0041,0x0042,0x0000            }, },  /* #8 */
87         /*expect*/ { 0,0,1,0x0049,                        },
88       },
89       { is_last: 1 }
90     }
91   },
92   {
93     { Twcscmp, TST_LOC_eucJP},
94     {
95       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
96                      { 0x3041,0x3042,0x3043,0x0000 }, },  /* #1 */
97         /*expect*/ { 0,0,1,0,                     },
98       },
99       { /*input.*/ { { 0x0000,0x3041,0x3043,0x0000 },
100                      { 0x0000,0x3042,0x3043,0x0000 }, },  /* #2 */
101         /*expect*/ { 0,0,1,0,                     },
102       },
103       { /*input.*/ { { 0x3041,0x3041,0x3043,0x0000 },
104                      { 0x0000,0x3042,0x3043,0x0000 }, },  /* #3 */
105         /*expect*/ { 0,0,1,0x3041,                        },
106       },
107       { /*input.*/ { { 0x0000,0x3042,0x3043,0x0000 },
108                      { 0x3041,0x3041,0x3043,0x0000 }, },  /* #4 */
109         /*expect*/ { 0,0,1,-0x3041,                       },
110       },
111       { /*input.*/ { { 0x3041,0x3045,0x3043,0x0000 },
112                      { 0x3041,0x3042,0x3043,0x0000 }, },  /* #5 */
113         /*expect*/ { 0,0,1,3,                     },
114       },
115       { /*input.*/ { { 0x3041,0x3042,0x3043,0x0000 },
116                      { 0x3041,0x3042,0x3049,0x0000 }, },  /* #6 */
117         /*expect*/ { 0,0,1,-6,                    },
118       },
119       { /*input.*/ { { 0x3041,0x3042,0x0000            },
120                      { 0x3041,0x3042,0x3049,0x0000 }, },  /* #7 */
121         /*expect*/ { 0,0,1,-0x3049,                       },
122       },
123       { /*input.*/ { { 0x3041,0x3042,0x3049,0x0000 },
124                      { 0x3041,0x3042,0x0000            }, },  /* #8 */
125         /*expect*/ { 0,0,1,0x3049,                        },
126       },
127       { is_last: 1 }
128     }
129   },
130   {
131     { Twcschr, TST_LOC_end}
132   }
133 };