The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
hash_tests.c File Reference

Tests for the hash table. More...

#include "acutest.h"
#include "acutest_helpers.h"
#include <freeradius-devel/util/hash.h>
#include <freeradius-devel/util/rand.h>
+ Include dependency graph for hash_tests.c:

Go to the source code of this file.

Data Structures

struct  hash_test_node_t
 

Macros

#define HASH_TEST_SIZE   1024
 

Functions

static int8_t hash_test_cmp (void const *one, void const *two)
 
static uint32_t hash_test_hash (void const *data)
 
static void test_hash64_functions (void)
 
static void test_hash_functions (void)
 
static void test_hash_table_basic (void)
 
static void test_hash_table_delete (void)
 
static void test_hash_table_duplicate (void)
 
static void test_hash_table_flatten (void)
 
static void test_hash_table_iter (void)
 
static void test_hash_table_many (void)
 
static void test_hash_table_replace (void)
 

Variables

 TEST_LIST
 

Detailed Description

Tests for the hash table.

Definition in file hash_tests.c.


Data Structure Documentation

◆ hash_test_node_t

struct hash_test_node_t

Definition at line 29 of file hash_tests.c.

Data Fields
char name[32]
uint32_t num

Macro Definition Documentation

◆ HASH_TEST_SIZE

#define HASH_TEST_SIZE   1024

Definition at line 145 of file hash_tests.c.

Function Documentation

◆ hash_test_cmp()

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

Definition at line 41 of file hash_tests.c.

+ Here is the caller graph for this function:

◆ hash_test_hash()

static uint32_t hash_test_hash ( void const *  data)
static

Definition at line 34 of file hash_tests.c.

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

◆ test_hash64_functions()

static void test_hash64_functions ( void  )
static

Definition at line 90 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_functions()

static void test_hash_functions ( void  )
static

Definition at line 51 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_basic()

static void test_hash_table_basic ( void  )
static

Definition at line 113 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_delete()

static void test_hash_table_delete ( void  )
static

Definition at line 275 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_duplicate()

static void test_hash_table_duplicate ( void  )
static

Definition at line 214 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_flatten()

static void test_hash_table_flatten ( void  )
static

Definition at line 343 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_iter()

static void test_hash_table_iter ( void  )
static

Definition at line 305 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_many()

static void test_hash_table_many ( void  )
static

Definition at line 150 of file hash_tests.c.

+ Here is the call graph for this function:

◆ test_hash_table_replace()

static void test_hash_table_replace ( void  )
static

Definition at line 237 of file hash_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "hash_functions", test_hash_functions },
{ "hash64_functions", test_hash64_functions },
{ "hash_table_basic", test_hash_table_basic },
{ "hash_table_many", test_hash_table_many },
{ "hash_table_duplicate", test_hash_table_duplicate },
{ "hash_table_replace", test_hash_table_replace },
{ "hash_table_delete", test_hash_table_delete },
{ "hash_table_iter", test_hash_table_iter },
{ "hash_table_flatten", test_hash_table_flatten },
}
#define TEST_TERMINATOR
Definition acutest.h:64
static void test_hash_table_iter(void)
Definition hash_tests.c:305
static void test_hash_functions(void)
Definition hash_tests.c:51
static void test_hash_table_replace(void)
Definition hash_tests.c:237
static void test_hash_table_duplicate(void)
Definition hash_tests.c:214
static void test_hash_table_basic(void)
Definition hash_tests.c:113
static void test_hash_table_delete(void)
Definition hash_tests.c:275
static void test_hash_table_many(void)
Definition hash_tests.c:150
static void test_hash64_functions(void)
Definition hash_tests.c:90
static void test_hash_table_flatten(void)
Definition hash_tests.c:343

Definition at line 381 of file hash_tests.c.