mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-01 02:34:55 +00:00
malloc-h: Add tests.
* tests/test-malloc-h.c: New file. * modules/malloc-h-tests: New file. * tests/test-malloc-h-c++.cc: New file. * modules/malloc-h-c++-tests: New file.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2020-12-31 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
malloc-h: Add tests.
|
||||
* tests/test-malloc-h.c: New file.
|
||||
* modules/malloc-h-tests: New file.
|
||||
* tests/test-malloc-h-c++.cc: New file.
|
||||
* modules/malloc-h-c++-tests: New file.
|
||||
|
||||
malloc-h: New module.
|
||||
* lib/malloc.in.h: New file.
|
||||
* m4/malloc_h.m4: New file.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
Files:
|
||||
tests/test-malloc-h-c++.cc
|
||||
tests/signature.h
|
||||
|
||||
Status:
|
||||
c++-test
|
||||
|
||||
Depends-on:
|
||||
ansi-c++-opt
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
if ANSICXX
|
||||
TESTS += test-malloc-h-c++
|
||||
check_PROGRAMS += test-malloc-h-c++
|
||||
test_malloc_h_c___SOURCES = test-malloc-h-c++.cc
|
||||
endif
|
||||
@@ -0,0 +1,11 @@
|
||||
Files:
|
||||
tests/test-malloc-h.c
|
||||
|
||||
Depends-on:
|
||||
malloc-h-c++-tests
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-malloc-h
|
||||
check_PROGRAMS += test-malloc-h
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Test of <malloc.h> 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2020. */
|
||||
|
||||
#define GNULIB_NAMESPACE gnulib
|
||||
#include <config.h>
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
#include "signature.h"
|
||||
|
||||
|
||||
#if GNULIB_TEST_MEMALIGN && HAVE_MEMALIGN
|
||||
SIGNATURE_CHECK (GNULIB_NAMESPACE::memalign, void *, (size_t, size_t));
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Test of <malloc.h> 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 <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Bruno Haible <bruno@clisp.org>, 2020. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user