summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-05-30 16:22:25 +0200
committerBruno Haible <bruno@clisp.org>2020-05-30 16:22:25 +0200
commit9e7d098310117f0b17e7868124652a392b0a9854 (patch)
tree2e607912d66a139bdcc0ba8b3be8b680200a461e /tests
parent7168ecc9cc88793fedca103ae8fc7be56349ca41 (diff)
downloadgnulib-9e7d098310117f0b17e7868124652a392b0a9854.tar.gz
sys_random: Add C++ tests.
* tests/test-sys_random-c++.cc: New file. * modules/sys_random-c++-tests: New file. * modules/sys_random-tests (Depends-on): Depend on it.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-sys_random-c++.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/test-sys_random-c++.cc b/tests/test-sys_random-c++.cc
new file mode 100644
index 0000000000..7477b3a9f4
--- /dev/null
+++ b/tests/test-sys_random-c++.cc
@@ -0,0 +1,35 @@
+/* Test of <sys/random.h> substitute in C++ mode.
+ Copyright (C) 2020 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>, 2020. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sys/random.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_GETRANDOM
+SIGNATURE_CHECK (GNULIB_NAMESPACE::getrandom, ssize_t, (void *, size_t, unsigned int));
+#endif
+
+
+int
+main ()
+{
+}