1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

Tests for module 'malloc-gnu'.

* modules/malloc-gnu-tests: New file.
* tests/test-malloc-gnu.c: New file.
This commit is contained in:
Ralf Wildenhues
2010-08-28 23:33:01 +02:00
committed by Bruno Haible
parent 8ffb3578c6
commit 60b3f5cc81
3 changed files with 45 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2010-08-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Tests for module 'malloc-gnu'.
* modules/malloc-gnu-tests: New file.
* tests/test-malloc-gnu.c: New file.
2010-08-28 Bruno Haible <bruno@clisp.org> 2010-08-28 Bruno Haible <bruno@clisp.org>
Rename module 'realloc' -> 'realloc-gnu'. Rename module 'realloc' -> 'realloc-gnu'.

10
modules/malloc-gnu-tests Normal file
View File

@@ -0,0 +1,10 @@
Files:
tests/test-malloc-gnu.c
Depends-on:
configure.ac:
Makefile.am:
TESTS += test-malloc-gnu
check_PROGRAMS += test-malloc-gnu

29
tests/test-malloc-gnu.c Normal file
View File

@@ -0,0 +1,29 @@
/* Test of malloc function.
Copyright (C) 2010 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 <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdlib.h>
int
main ()
{
/* Check that malloc (0) is not a NULL pointer. */
if (malloc (0) == NULL)
return 1;
return 0;
}