>From d5046bf23fde7c080388403666958240df29abfa Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 3 Sep 2022 20:58:32 +0200 Subject: [PATCH 07/14] 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. --- ChangeLog | 5 +++++ modules/sys_file-c++-tests | 17 +++++++++++++++++ modules/sys_file-tests | 1 + tests/test-sys_file-c++.cc | 28 ++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 modules/sys_file-c++-tests create mode 100644 tests/test-sys_file-c++.cc diff --git a/ChangeLog b/ChangeLog index e6a48eb067..d19e201a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2022-09-03 Bruno Haible + 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 index 0000000000..7c2af85f02 --- /dev/null +++ b/modules/sys_file-c++-tests @@ -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 diff --git a/modules/sys_file-tests b/modules/sys_file-tests index f52629d545..2fdaf0b354 100644 --- a/modules/sys_file-tests +++ b/modules/sys_file-tests @@ -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 index 0000000000..e87e2471c7 --- /dev/null +++ b/tests/test-sys_file-c++.cc @@ -0,0 +1,28 @@ +/* Test of 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 . */ + +/* Written by Bruno Haible , 2022. */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include + + +int +main () +{ +} -- 2.34.1