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

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

index e6a48eb067d81d1261eecfcfe6456184a2e332e0..d19e201a07c626c92a48fd022cc66dc7cfbb43de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2022-09-03  Bruno Haible  <bruno@clisp.org>
 
+       sys_file: Add C++ tests.
+       * tests/test-sys_file-c++.cc: New file.
+       * modules/sys_file-c++-tests: New file.
+       * modules/sys_file-tests (Depends-on): Add sys_file-c++-tests.
+
        sys_file: Document this module.
        * doc/glibc-headers/sys_file.texi: New file.
        * doc/gnulib.texi (Glibc Header File Substitutes): Include it.
diff --git a/modules/sys_file-c++-tests b/modules/sys_file-c++-tests
new file mode 100644 (file)
index 0000000..7c2af85
--- /dev/null
@@ -0,0 +1,17 @@
+Files:
+tests/test-sys_file-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_file-c++
+check_PROGRAMS += test-sys_file-c++
+test_sys_file_c___SOURCES = test-sys_file-c++.cc
+endif
index f52629d545df876cd045a1eefa6054d10d8c376c..2fdaf0b35403ea05350248592e800659c984d685 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-sys_file.c
 
 Depends-on:
+sys_file-c++-tests
 
 configure.ac:
 
diff --git a/tests/test-sys_file-c++.cc b/tests/test-sys_file-c++.cc
new file mode 100644 (file)
index 0000000..e87e247
--- /dev/null
@@ -0,0 +1,28 @@
+/* Test of <sys/file.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 <sys/file.h>
+
+
+int
+main ()
+{
+}