From: Bastien Roucariès <ro...@debian.org> Simple test
Signed-off-by: Bastien Roucariès <ro...@debian.org> --- tests/test-explicit_bzero.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/test-explicit_bzero.c diff --git a/tests/test-explicit_bzero.c b/tests/test-explicit_bzero.c new file mode 100644 index 000000000..902866cdd --- /dev/null +++ b/tests/test-explicit_bzero.c @@ -0,0 +1,34 @@ +/* Test of asinl() function. + Copyright (C) 2010-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 Bastien Roucariès <ro...@debian.org> */ + +#include <config.h> + +#include <string.h> + +#include "macros.h" + +char hello[] = "hello"; + +int +main () +{ + explicit_bzero(hello,sizeof(hello)); + ASSERT (hello[0]==0); + + return 0; +} -- 2.25.1