summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--modules/uchar-c++-tests18
-rw-r--r--tests/test-uchar-c++.cc28
-rw-r--r--tests/test-uchar-c++2.cc24
4 files changed, 75 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d501b8aed..f503efeb5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2019-12-31 Bruno Haible <bruno@clisp.org>
+ uchar: Add C++ tests.
+ * tests/test-uchar-c++.cc: New file.
+ * tests/test-uchar-c++2.cc: New file.
+ * modules/uchar-c++-tests: New file.
+
uchar: Add tests.
* tests/test-uchar.c: New file.
* modules/uchar-tests: New file.
diff --git a/modules/uchar-c++-tests b/modules/uchar-c++-tests
new file mode 100644
index 0000000000..8fb7463e60
--- /dev/null
+++ b/modules/uchar-c++-tests
@@ -0,0 +1,18 @@
+Files:
+tests/test-uchar-c++.cc
+tests/test-uchar-c++2.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-uchar-c++
+check_PROGRAMS += test-uchar-c++
+test_uchar_c___SOURCES = test-uchar-c++.cc test-uchar-c++2.cc
+endif
diff --git a/tests/test-uchar-c++.cc b/tests/test-uchar-c++.cc
new file mode 100644
index 0000000000..9b5d8ebb88
--- /dev/null
+++ b/tests/test-uchar-c++.cc
@@ -0,0 +1,28 @@
+/* Test of <uchar.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/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <uchar.h>
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-uchar-c++2.cc b/tests/test-uchar-c++2.cc
new file mode 100644
index 0000000000..80a5d448ac
--- /dev/null
+++ b/tests/test-uchar-c++2.cc
@@ -0,0 +1,24 @@
+/* Test of <uchar.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>
+
+#if __cplusplus >= 201103
+
+# include <cuchar>
+
+#endif