New module 'wcsncpy'.
[gnulib.git] / tests / test-wchar-c++.cc
1 /* Test of <wchar.h> substitute in C++ mode.
2    Copyright (C) 2010-2011 Free Software Foundation, Inc.
3
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.
8
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.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
16
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
18
19 #define GNULIB_NAMESPACE gnulib
20 #include <config.h>
21
22 #include <wchar.h>
23
24 #include "signature.h"
25
26
27 #if GNULIB_TEST_BTOWC
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::btowc, wint_t, (int));
29 #endif
30
31 #if GNULIB_TEST_WCTOB
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::wctob, int, (wint_t));
33 #endif
34
35 #if GNULIB_TEST_MBSINIT
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsinit, int, (const mbstate_t *));
37 #endif
38
39 #if GNULIB_TEST_MBRTOWC
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrtowc, size_t,
41                  (wchar_t *, const char *, size_t, mbstate_t *));
42 #endif
43
44 #if GNULIB_TEST_MBRLEN
45 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbrlen, size_t,
46                  (const char *, size_t, mbstate_t *));
47 #endif
48
49 #if GNULIB_TEST_MBSRTOWCS
50 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsrtowcs, size_t,
51                  (wchar_t *, const char **, size_t, mbstate_t *));
52 #endif
53
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
58
59 #if GNULIB_TEST_WCRTOMB
60 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcrtomb, size_t,
61                  (char *, wchar_t, mbstate_t *));
62 #endif
63
64 #if GNULIB_TEST_WCSRTOMBS
65 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsrtombs, size_t,
66                  (char *, const wchar_t **, size_t, mbstate_t *));
67 #endif
68
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
73
74 #if GNULIB_TEST_WCWIDTH
75 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcwidth, int, (wchar_t));
76 #endif
77
78 #if GNULIB_TEST_WMEMCHR
79 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemchr, wchar_t *,
80                  (const wchar_t *, wchar_t, size_t));
81 #endif
82
83 #if GNULIB_TEST_WMEMCMP
84 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcmp, int,
85                  (const wchar_t *, const wchar_t *, size_t));
86 #endif
87
88 #if GNULIB_TEST_WMEMCPY
89 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemcpy, wchar_t *,
90                  (wchar_t *, const wchar_t *, size_t));
91 #endif
92
93 #if GNULIB_TEST_WMEMMOVE
94 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemmove, wchar_t *,
95                  (wchar_t *, const wchar_t *, size_t));
96 #endif
97
98 #if GNULIB_TEST_WMEMSET
99 SIGNATURE_CHECK (GNULIB_NAMESPACE::wmemset, wchar_t *,
100                  (wchar_t *, wchar_t, size_t));
101 #endif
102
103 #if GNULIB_TEST_WCSLEN
104 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcslen, size_t, (const wchar_t *));
105 #endif
106
107 #if GNULIB_TEST_WCSNLEN
108 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsnlen, size_t, (const wchar_t *, size_t));
109 #endif
110
111 #if GNULIB_TEST_WCSCPY
112 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcscpy, wchar_t *,
113                  (wchar_t *, const wchar_t *));
114 #endif
115
116 #if GNULIB_TEST_WCPCPY
117 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcpcpy, wchar_t *,
118                  (wchar_t *, const wchar_t *));
119 #endif
120
121 #if GNULIB_TEST_WCSNCPY
122 SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsncpy, wchar_t *,
123                  (wchar_t *, const wchar_t *, size_t));
124 #endif
125
126
127 int
128 main ()
129 {
130 }