The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Macros | Functions | Variables
heap_tests.c File Reference
#include <freeradius-devel/util/acutest.h>
#include <freeradius-devel/util/time.h>
#include <freeradius-devel/util/rand.h>
#include "heap.c"
+ Include dependency graph for heap_tests.c:

Go to the source code of this file.

Data Structures

struct  heap_thing
 

Macros

#define HEAP_CYCLE_SIZE   (1600000)
 
#define HEAP_ITER_SIZE   20
 
#define HEAP_TEST_SIZE   (4096)
 

Functions

static bool fr_heap_check (fr_heap_t *h, void *data)
 
 free (array)
 
static int8_t heap_cmp (void const *one, void const *two)
 
static void heap_cycle (void)
 
static void heap_iter (void)
 
static void heap_test (int skip)
 
static void heap_test_order (void)
 
static void heap_test_skip_0 (void)
 
static void heap_test_skip_10 (void)
 
static void heap_test_skip_2 (void)
 
 talloc_free (hp)
 
 TEST_CHECK (data_set==((1U<< HEAP_ITER_SIZE) - 1U))
 

Variables

 TEST_LIST
 

Data Structure Documentation

◆ heap_thing

struct heap_thing

Definition at line 22 of file heap_tests.c.

Data Fields
int data
unsigned int heap

Macro Definition Documentation

◆ HEAP_CYCLE_SIZE

#define HEAP_CYCLE_SIZE   (1600000)

Definition at line 137 of file heap_tests.c.

◆ HEAP_ITER_SIZE

#define HEAP_ITER_SIZE   20

Definition at line 189 of file heap_tests.c.

◆ HEAP_TEST_SIZE

#define HEAP_TEST_SIZE   (4096)

Definition at line 40 of file heap_tests.c.

Function Documentation

◆ fr_heap_check()

static bool fr_heap_check ( fr_heap_t h,
void *  data 
)
static

Definition at line 7 of file heap_tests.c.

+ Here is the caller graph for this function:

◆ free()

free ( array  )
+ Here is the caller graph for this function:

◆ heap_cmp()

static int8_t heap_cmp ( void const *  one,
void const *  two 
)
static

Definition at line 33 of file heap_tests.c.

+ Here is the caller graph for this function:

◆ heap_cycle()

static void heap_cycle ( void  )
static

Definition at line 218 of file heap_tests.c.

+ Here is the call graph for this function:

◆ heap_iter()

static void heap_iter ( void  )
static

Definition at line 191 of file heap_tests.c.

+ Here is the call graph for this function:

◆ heap_test()

static void heap_test ( int  skip)
static

Definition at line 42 of file heap_tests.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ heap_test_order()

static void heap_test_order ( void  )
static

Definition at line 139 of file heap_tests.c.

+ Here is the call graph for this function:

◆ heap_test_skip_0()

static void heap_test_skip_0 ( void  )
static

Definition at line 122 of file heap_tests.c.

+ Here is the call graph for this function:

◆ heap_test_skip_10()

static void heap_test_skip_10 ( void  )
static

Definition at line 132 of file heap_tests.c.

+ Here is the call graph for this function:

◆ heap_test_skip_2()

static void heap_test_skip_2 ( void  )
static

Definition at line 127 of file heap_tests.c.

+ Here is the call graph for this function:

◆ talloc_free()

talloc_free ( hp  )
+ Here is the caller graph for this function:

◆ TEST_CHECK()

TEST_CHECK ( data_set  = =((1U<< HEAP_ITER_SIZE) - 1U))
+ Here is the caller graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "heap_test_skip_0", heap_test_skip_0 },
{ "heap_test_skip_2", heap_test_skip_2 },
{ "heap_test_skip_10", heap_test_skip_10 },
{ "heap_test_order", heap_test_order },
{ "heap_iter", heap_iter },
{ "heap_cycle", heap_cycle },
{ NULL }
}
static void heap_test_order(void)
Definition: heap_tests.c:139
static void heap_iter(void)
Definition: heap_tests.c:191
static void heap_test_skip_0(void)
Definition: heap_tests.c:122
static void heap_test_skip_10(void)
Definition: heap_tests.c:132
static void heap_test_skip_2(void)
Definition: heap_tests.c:127
static void heap_cycle(void)
Definition: heap_tests.c:218

Definition at line 305 of file heap_tests.c.