maint.mk: Update system header list for #include syntax checks.
[gnulib.git] / tests / test-wchar-c++.cc
blob89d4751fe85e86c8771b60000cb72b90e2f78a63
1 /* Test of <wchar.h> substitute in C++ mode.
2 Copyright (C) 2010-2024 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
20 #include <config.h>
22 #include <wchar.h>
24 #include "signature.h"
27 #if GNULIB_TEST_BTOWC
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::btowc, wint_t, (int));
29 #endif
31 #if GNULIB_TEST_WCTOB
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::wctob, int, (wint_t));
33 #endif
35 #if GNULIB_TEST_MBSINIT
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsinit, int, (const mbstate_t *));
37 #endif
39 #if GNULIB_TEST_MBRTOWC
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrtowc, size_t,
41 (wchar_t *, const char *, size_t, mbstate_t *));
42 #endif
44 #if GNULIB_TEST_MBRLEN
45 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrlen, size_t,
46 (const char *, size_t, mbstate_t *));
47 #endif
49 #if GNULIB_TEST_MBSRTOWCS
50 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsrtowcs, size_t,
51 (wchar_t *, const char **, size_t, mbstate_t *));
52 #endif
54 #if GNULIB_TEST_MBSNRTOWCS
55 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsnrtowcs, size_t,
56 (wchar_t *, const char **, size_t, size_t, mbstate_t *));
57 #endif
59 #if GNULIB_TEST_WCRTOMB
60 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcrtomb, size_t,
61 (char *, wchar_t, mbstate_t *));
62 #endif
64 #if GNULIB_TEST_WCSRTOMBS
65 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrtombs, size_t,
66 (char *, const wchar_t **, size_t, mbstate_t *));
67 #endif
69 #if GNULIB_TEST_WCSNRTOMBS
70 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnrtombs, size_t,
71 (char *, const wchar_t **, size_t, size_t, mbstate_t *));
72 #endif
74 #if GNULIB_TEST_WCWIDTH
75 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcwidth, int, (wchar_t));
76 #endif
78 #if GNULIB_TEST_WMEMCHR
79 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemchr, wchar_t *,
80 (const wchar_t *, wchar_t, size_t));
81 #endif
83 #if GNULIB_TEST_WMEMCMP
84 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcmp, int,
85 (const wchar_t *, const wchar_t *, size_t));
86 #endif
88 #if GNULIB_TEST_WMEMCPY
89 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcpy, wchar_t *,
90 (wchar_t *, const wchar_t *, size_t));
91 #endif
93 #if GNULIB_TEST_WMEMMOVE
94 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemmove, wchar_t *,
95 (wchar_t *, const wchar_t *, size_t));
96 #endif
98 #if GNULIB_TEST_WMEMPCPY
99 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmempcpy, wchar_t *,
100 (wchar_t *, const wchar_t *, size_t));
101 #endif
103 #if GNULIB_TEST_WMEMSET
104 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemset, wchar_t *,
105 (wchar_t *, wchar_t, size_t));
106 #endif
108 #if GNULIB_TEST_WCSLEN
109 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcslen, size_t, (const wchar_t *));
110 #endif
112 #if GNULIB_TEST_WCSNLEN
113 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnlen, size_t, (const wchar_t *, size_t));
114 #endif
116 #if GNULIB_TEST_WCSCPY
117 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscpy, wchar_t *,
118 (wchar_t *, const wchar_t *));
119 #endif
121 #if GNULIB_TEST_WCPCPY
122 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpcpy, wchar_t *,
123 (wchar_t *, const wchar_t *));
124 #endif
126 #if GNULIB_TEST_WCSNCPY
127 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncpy, wchar_t *,
128 (wchar_t *, const wchar_t *, size_t));
129 #endif
131 #if GNULIB_TEST_WCPNCPY
132 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpncpy, wchar_t *,
133 (wchar_t *, const wchar_t *, size_t));
134 #endif
136 #if GNULIB_TEST_WCSCAT
137 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscat, wchar_t *,
138 (wchar_t *, const wchar_t *));
139 #endif
141 #if GNULIB_TEST_WCSNCAT
142 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncat, wchar_t *,
143 (wchar_t *, const wchar_t *, size_t));
144 #endif
146 #if GNULIB_TEST_WCSCMP
147 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscmp, int,
148 (const wchar_t *, const wchar_t *));
149 #endif
151 #if GNULIB_TEST_WCSNCMP
152 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncmp, int,
153 (const wchar_t *, const wchar_t *, size_t));
154 #endif
156 #if GNULIB_TEST_WCSCASECMP
157 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscasecmp, int,
158 (const wchar_t *, const wchar_t *));
159 #endif
161 #if GNULIB_TEST_WCSNCASECMP
162 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncasecmp, int,
163 (const wchar_t *, const wchar_t *, size_t));
164 #endif
166 #if GNULIB_TEST_WCSCOLL
167 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscoll, int,
168 (const wchar_t *, const wchar_t *));
169 #endif
171 #if GNULIB_TEST_WCSXFRM
172 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsxfrm, size_t,
173 (wchar_t *, const wchar_t *, size_t));
174 #endif
176 #if GNULIB_TEST_WCSDUP
177 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsdup, wchar_t *, (const wchar_t *));
178 #endif
180 #if GNULIB_TEST_WCSCHR
181 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcschr, wchar_t *,
182 (const wchar_t *, wchar_t));
183 #endif
185 #if GNULIB_TEST_WCSRCHR
186 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrchr, wchar_t *,
187 (const wchar_t *, wchar_t));
188 #endif
190 #if GNULIB_TEST_WCSCSPN
191 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscspn, size_t,
192 (const wchar_t *, const wchar_t *));
193 #endif
195 #if GNULIB_TEST_WCSSPN
196 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsspn, size_t,
197 (const wchar_t *, const wchar_t *));
198 #endif
200 #if GNULIB_TEST_WCSPBRK
201 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcspbrk, wchar_t *,
202 (const wchar_t *, const wchar_t *));
203 #endif
205 #if GNULIB_TEST_WCSSTR
206 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsstr, wchar_t *,
207 (const wchar_t *, const wchar_t *));
208 #endif
210 #if GNULIB_TEST_WCSTOK
211 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcstok, wchar_t *,
212 (wchar_t *, const wchar_t *, wchar_t **));
213 #endif
215 #if GNULIB_TEST_WCSWIDTH
216 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcswidth, int, (const wchar_t *, size_t));
217 #endif
219 #if GNULIB_TEST_WCSFTIME
220 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsftime, size_t,
221 (wchar_t *, size_t, const wchar_t *, const struct tm *));
222 #endif
226 main ()