>From 263beff33db15c12cf425f991e95f13a91350f8d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 3 Sep 2022 20:39:11 +0200 Subject: [PATCH 03/14] sched: Add C++ tests. * tests/test-sched-c++.cc: New file. * modules/sched-c++-tests: New file. * modules/sched-tests (Depends-on): Add sched-c++-tests. --- ChangeLog | 7 +++++++ modules/sched-c++-tests | 19 +++++++++++++++++++ modules/sched-tests | 1 + tests/test-sched-c++.cc | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 modules/sched-c++-tests create mode 100644 tests/test-sched-c++.cc diff --git a/ChangeLog b/ChangeLog index 787971efab..2ac7ffd2e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-09-03 Bruno Haible + + sched: Add C++ tests. + * tests/test-sched-c++.cc: New file. + * modules/sched-c++-tests: New file. + * modules/sched-tests (Depends-on): Add sched-c++-tests. + 2022-09-03 Bruno Haible netinet_in: Add C++ tests. diff --git a/modules/sched-c++-tests b/modules/sched-c++-tests new file mode 100644 index 0000000000..28c6ea184d --- /dev/null +++ b/modules/sched-c++-tests @@ -0,0 +1,19 @@ +Files: +tests/test-sched-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-sched-c++ +check_PROGRAMS += test-sched-c++ +test_sched_c___SOURCES = test-sched-c++.cc +test_sched_c___LDADD = $(LDADD) $(LIB_SCHED_YIELD) +endif diff --git a/modules/sched-tests b/modules/sched-tests index 8427490f57..52eed8bc25 100644 --- a/modules/sched-tests +++ b/modules/sched-tests @@ -2,6 +2,7 @@ Files: tests/test-sched.c Depends-on: +sched-c++-tests configure.ac: diff --git a/tests/test-sched-c++.cc b/tests/test-sched-c++.cc new file mode 100644 index 0000000000..7ba8aaac06 --- /dev/null +++ b/tests/test-sched-c++.cc @@ -0,0 +1,35 @@ +/* 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 + +#include "signature.h" + + +#if GNULIB_TEST_SCHED_YIELD +SIGNATURE_CHECK (GNULIB_NAMESPACE::sched_yield, int, (void)); +#endif + + +int +main () +{ +} -- 2.34.1