summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-12-05 09:18:13 +0100
committerBruno Haible <bruno@clisp.org>2019-12-05 09:50:50 +0100
commitd81cfbdda4dcadcfe61daeafe92c34871a669098 (patch)
treec0139488319e080a896cf90f3c0292f1e4029882
parentea45fdf1af3c1dc7ce603b0b7f3d50fd8475077e (diff)
downloadgnulib-d81cfbdda4dcadcfe61daeafe92c34871a669098.tar.gz
gnulib-d81cfbdda4dcadcfe61daeafe92c34871a669098.tar.bz2
wchar: Add more C++ tests.
Reported by Christian Biesinger <cbiesinger@google.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>. * tests/test-wchar-c++3.cc: New file. * modules/wchar-c++-tests (Files): Add it. (Makefile.am): Compile it.
-rw-r--r--ChangeLog9
-rw-r--r--modules/wchar-c++-tests3
-rw-r--r--tests/test-wchar-c++3.cc22
3 files changed, 33 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bbc40dd964..8574070f1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2019-12-05 Bruno Haible <bruno@clisp.org>
+ wchar: Add more C++ tests.
+ Reported by Christian Biesinger <cbiesinger@google.com> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2019-12/msg00009.html>.
+ * tests/test-wchar-c++3.cc: New file.
+ * modules/wchar-c++-tests (Files): Add it.
+ (Makefile.am): Compile it.
+
+2019-12-05 Bruno Haible <bruno@clisp.org>
+
Add more C++ tests.
assert-h: Add C++ tests.
diff --git a/modules/wchar-c++-tests b/modules/wchar-c++-tests
index 75ff6518a9..a91e43aec4 100644
--- a/modules/wchar-c++-tests
+++ b/modules/wchar-c++-tests
@@ -1,6 +1,7 @@
Files:
tests/test-wchar-c++.cc
tests/test-wchar-c++2.cc
+tests/test-wchar-c++3.cc
tests/signature.h
Status:
@@ -15,6 +16,6 @@ Makefile.am:
if ANSICXX
TESTS += test-wchar-c++
check_PROGRAMS += test-wchar-c++
-test_wchar_c___SOURCES = test-wchar-c++.cc test-wchar-c++2.cc
+test_wchar_c___SOURCES = test-wchar-c++.cc test-wchar-c++2.cc test-wchar-c++3.cc
test_wchar_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_EACCESS) $(LIBTHREAD)
endif
diff --git a/tests/test-wchar-c++3.cc b/tests/test-wchar-c++3.cc
new file mode 100644
index 0000000000..622dec0c2d
--- /dev/null
+++ b/tests/test-wchar-c++3.cc
@@ -0,0 +1,22 @@
+/* Test of <wchar.h> substitute in C++ mode.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <wchar.h>
+#include <cstring>
+#include <sstream>

Return to:

Send suggestions and report system problems to the System administrator.