From: Bruno Haible Date: Sat, 30 May 2020 14:22:25 +0000 (+0200) Subject: sys_random: Add C++ tests. X-Git-Tag: v1.0~4012 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9e7d098310117f0b17e7868124652a392b0a9854;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index f458e9dc12..c5a3bd5868 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2020-05-30 Bruno Haible + 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. + sys_random: Add tests. * tests/test-sys_random.c: New file. * modules/sys_random-tests: New file. diff --git a/modules/sys_random-c++-tests b/modules/sys_random-c++-tests new file mode 100644 index 0000000000..e07d81f0e7 --- /dev/null +++ b/modules/sys_random-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/test-sys_random-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-sys_random-c++ +check_PROGRAMS += test-sys_random-c++ +test_sys_random_c___SOURCES = test-sys_random-c++.cc +endif diff --git a/modules/sys_random-tests b/modules/sys_random-tests index 24fea63612..2208c5a7e3 100644 --- a/modules/sys_random-tests +++ b/modules/sys_random-tests @@ -2,6 +2,7 @@ Files: tests/test-sys_random.c Depends-on: +sys_random-c++-tests configure.ac: 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 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 . */ + +/* Written by Bruno Haible , 2020. */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include + +#include "signature.h" + + +#if GNULIB_TEST_GETRANDOM +SIGNATURE_CHECK (GNULIB_NAMESPACE::getrandom, ssize_t, (void *, size_t, unsigned int)); +#endif + + +int +main () +{ +}