Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

torture_heap.c File Reference

Detailed Description

Test heap.

For internal use only.

Pekka Pessi <Pekka.Pessi@nokia.com>

Definition in file torture_heap.c.

#include "config.h"
#include <sofia-sip/heap.h>
#include <unistd.h>
#include <stddef.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sofia-sip/tstdef.h>

Go to the source code of this file.


struct  type1


#define alloc(a, o, size)   realloc((o), (size))
#define scope   static
#define TSTFLAGS   tstflags


typedef HEAP_TYPE Heap1
typedef HEAP_TYPE Heap2
typedef struct type1 * type2


 HEAP_BODIES (static, Heap2, heap2_, type1 *, less2, set2, alloc, NULL)
 HEAP_BODIES (static, Heap1, heap1_, type1, less1, set1, alloc, null)
 HEAP_DECLARE (static, Heap2, heap2_, type1 *)
 HEAP_DECLARE (static, Heap1, heap1_, type1)
static int int_less (void *_array, size_t a, size_t b)
static void int_swap (void *_array, size_t a, size_t b)
static int less1 (type1 a, type1 b)
static int less2 (type2 a, type2 b)
int main (int argc, char *argv[])
static void set1 (type1 *heap, size_t index, type1 e)
static void set2 (type2 *heap, size_t index, type2 e)
int test_ref ()
int test_smooth_sort ()
void test_sort (int *array, size_t r, size_t N)
int test_triplet ()
int test_value ()
void usage (int exitcode)


size_t _cmp
size_t _set
char name [] = "torture_heap"
static type1 const null = { 0, 0, 0 }
int tstflags

Generated by  Doxygen 1.6.0   Back to index