]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
uchar: Add C++ tests.
authorBruno Haible <bruno@clisp.org>
Tue, 31 Dec 2019 18:38:50 +0000 (19:38 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 31 Dec 2019 18:38:50 +0000 (19:38 +0100)
* tests/test-uchar-c++.cc: New file.
* tests/test-uchar-c++2.cc: New file.
* modules/uchar-c++-tests: New file.

ChangeLog
modules/uchar-c++-tests [new file with mode: 0644]
tests/test-uchar-c++.cc [new file with mode: 0644]
tests/test-uchar-c++2.cc [new file with mode: 0644]

index 6d501b8aedab4344e65252b32a8f1a7533ffb2ca..f503efeb5ff729ee06dab6dd71e14e231cca2a00 100644 (file)
--- 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 (file)
index 0000000..8fb7463
--- /dev/null
@@ -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 (file)
index 0000000..9b5d8eb
--- /dev/null
@@ -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 (file)
index 0000000..80a5d44
--- /dev/null
@@ -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