>From 7168ecc9cc88793fedca103ae8fc7be56349ca41 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 30 May 2020 16:20:32 +0200 Subject: [PATCH 2/3] sys_random: Add tests. * tests/test-sys_random.c: New file. * modules/sys_random-tests: New file. --- ChangeLog | 4 ++++ modules/sys_random-tests | 10 ++++++++++ tests/test-sys_random.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 modules/sys_random-tests create mode 100644 tests/test-sys_random.c diff --git a/ChangeLog b/ChangeLog index 3c4dd93..f458e9d 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 0000000..24fea63 --- /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 0000000..56da27b --- /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; +} -- 2.7.4