libavl/test.h
00001 /* Produced by texiweb from libavl.w. */
00002 
00003 /* libavl - library for manipulation of binary trees.
00004    Copyright (C) 1998-2002, 2004 Free Software Foundation, Inc.
00005 
00006    This program is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU General Public License as
00008    published by the Free Software Foundation; either version 2 of the
00009    License, or (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful, but
00012    WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00014    See the GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00019    02111-1307, USA.
00020 
00021    The author may be contacted at <blp@gnu.org> on the Internet, or
00022    write to Ben Pfaff, Stanford University, Computer Science Dept., 353
00023    Serra Mall, Stanford CA 94305, USA.
00024 */
00025 
00026 #ifndef TEST_H
00027 #define TEST_H 1
00028 
00029 #ifndef LIBAVL_ALLOCATOR
00030 #define LIBAVL_ALLOCATOR
00031 /* Memory allocator. */
00032 struct libavl_allocator
00033   {
00034     void *(*libavl_malloc) (struct libavl_allocator *, size_t libavl_size);
00035     void (*libavl_free) (struct libavl_allocator *, void *libavl_block);
00036   };
00037 #endif
00038 
00039 int test_correctness (struct libavl_allocator *allocator,
00040                       int insert[], int delete[], int n, int verbosity);
00041 int test_overflow (struct libavl_allocator *, int order[], int n,
00042                    int verbosity);
00043 int compare_ints (const void *pa, const void *pb, void *param);
00044 
00045 #endif /* test.h */
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines