]> Savannah Git Hosting - gnulib.git/commitdiff
sysexits: Add C++ tests.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Sep 2022 19:13:35 +0000 (21:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 3 Sep 2022 23:17:47 +0000 (01:17 +0200)
* tests/test-sysexits-c++.cc: New file.
* modules/sysexits-c++-tests: New file.
* modules/sysexits-tests (Depends-on): Add sysexits-c++-tests.

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

index 9bfc6173a190059bbdf23dfef604f4311f1a4a62..eb6a269b2435b55b5ccb0b5704da5aa9f4112b3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-09-03  Bruno Haible  <bruno@clisp.org>
+
+       sysexits: Add C++ tests.
+       * tests/test-sysexits-c++.cc: New file.
+       * modules/sysexits-c++-tests: New file.
+       * modules/sysexits-tests (Depends-on): Add sysexits-c++-tests.
+
 2022-09-03  Bruno Haible  <bruno@clisp.org>
 
        sys_utsname: Add C++ tests.
diff --git a/modules/sysexits-c++-tests b/modules/sysexits-c++-tests
new file mode 100644 (file)
index 0000000..e937d82
--- /dev/null
@@ -0,0 +1,17 @@
+Files:
+tests/test-sysexits-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sysexits-c++
+check_PROGRAMS += test-sysexits-c++
+test_sysexits_c___SOURCES = test-sysexits-c++.cc
+endif
index 7794cf05b149f56fd8bb3da9250c5ccd3786ddcb..e8de13a1c24938393bbd404b1297599a3518ee45 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-sysexits.c
 
 Depends-on:
+sysexits-c++-tests
 
 configure.ac:
 
diff --git a/tests/test-sysexits-c++.cc b/tests/test-sysexits-c++.cc
new file mode 100644 (file)
index 0000000..619369d
--- /dev/null
@@ -0,0 +1,28 @@
+/* Test of <sysexits.h> substitute in C++ mode.
+   Copyright (C) 2022 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>, 2022.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sysexits.h>
+
+
+int
+main ()
+{
+}