summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-09-03 20:39:11 +0200
committerBruno Haible <bruno@clisp.org>2022-09-04 01:17:42 +0200
commit263beff33db15c12cf425f991e95f13a91350f8d (patch)
tree82e5deb95ff8f7404e3b8eb1f54d9e2fa4ca233f /tests
parentc6dc4ec6cac1c2ecac037df50d83ff7267eb144a (diff)
downloadgnulib-263beff33db15c12cf425f991e95f13a91350f8d.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-sched-c++.cc35
1 files changed, 35 insertions, 0 deletions
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 <sched.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 <sched.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_SCHED_YIELD
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sched_yield, int, (void));
+#endif
+
+
+int
+main ()
+{
+}