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

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

index d19e201a07c626c92a48fd022cc66dc7cfbb43de..60a289c1c3d092de83d92c7d0399383978522742 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-09-03  Bruno Haible  <bruno@clisp.org>
+
+       sys_times: Add C++ tests.
+       * tests/test-sys_times-c++.cc: New file.
+       * modules/sys_times-c++-tests: New file.
+       * modules/sys_times-tests (Depends-on): Add sys_times-c++-tests.
+
 2022-09-03  Bruno Haible  <bruno@clisp.org>
 
        sys_file: Add C++ tests.
diff --git a/modules/sys_times-c++-tests b/modules/sys_times-c++-tests
new file mode 100644 (file)
index 0000000..a55256d
--- /dev/null
@@ -0,0 +1,17 @@
+Files:
+tests/test-sys_times-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_times-c++
+check_PROGRAMS += test-sys_times-c++
+test_sys_times_c___SOURCES = test-sys_times-c++.cc
+endif
index f622157035c3286cd87c3ce19304901f01364a2a..f5d4021bdd0c094cb37511a16697fac0b45136a9 100644 (file)
@@ -1,6 +1,11 @@
 Files:
 tests/test-sys_times.c
 
+Depends-on:
+sys_times-c++-tests
+
+configure.ac:
+
 Makefile.am:
 TESTS += test-sys_times
 check_PROGRAMS += test-sys_times
diff --git a/tests/test-sys_times-c++.cc b/tests/test-sys_times-c++.cc
new file mode 100644 (file)
index 0000000..4b26814
--- /dev/null
@@ -0,0 +1,28 @@
+/* Test of <sys/times.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/times.h>
+
+
+int
+main ()
+{
+}