From: Bruno Haible Date: Sat, 30 May 2020 14:20:32 +0000 (+0200) Subject: sys_random: Add tests. X-Git-Tag: v1.0~4013 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7168ecc9cc88793fedca103ae8fc7be56349ca41;p=gnulib.git sys_random: Add tests. * tests/test-sys_random.c: New file. * modules/sys_random-tests: New file. --- diff --git a/ChangeLog b/ChangeLog index 3c4dd93b7c..f458e9dc12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-05-30 Bruno Haible + sys_random: Add tests. + * tests/test-sys_random.c: New file. + * modules/sys_random-tests: New file. + sys_random: New module. * lib/sys_random.in.h: Use the common idioms for overridable header files. diff --git a/modules/sys_random-tests b/modules/sys_random-tests new file mode 100644 index 0000000000..24fea63612 --- /dev/null +++ b/modules/sys_random-tests @@ -0,0 +1,10 @@ +Files: +tests/test-sys_random.c + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-sys_random +check_PROGRAMS += test-sys_random diff --git a/tests/test-sys_random.c b/tests/test-sys_random.c new file mode 100644 index 0000000000..56da27b236 --- /dev/null +++ b/tests/test-sys_random.c @@ -0,0 +1,32 @@ +/* Test of substitute. + 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 . */ + +#include + +#include + +/* Check that the necessary constants are defined. */ +int flags[] = + { + GRND_RANDOM, + GRND_NONBLOCK + }; + +int +main (void) +{ + return 0; +}