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

Tests for the trie data structure. More...

#include "acutest.h"
#include "acutest_helpers.h"
#include <freeradius-devel/util/trie.h>
#include <freeradius-devel/util/inet.h>
+ Include dependency graph for trie_tests.c:

Go to the source code of this file.

Data Structures

struct  walk_ctx_t
 

Functions

static void test_trie_alloc (void)
 
static void test_trie_bit_prefix (void)
 
static void test_trie_insert_duplicate (void)
 
static void test_trie_insert_lookup (void)
 
static void test_trie_longest_prefix (void)
 
static void test_trie_many (void)
 
static void test_trie_remove (void)
 
static void test_trie_walk (void)
 
static int walk_callback (uint8_t const *key, size_t keylen, UNUSED void *data, void *uctx)
 

Variables

 TEST_LIST
 

Detailed Description

Tests for the trie data structure.

Definition in file trie_tests.c.


Data Structure Documentation

◆ walk_ctx_t

struct walk_ctx_t

Definition at line 216 of file trie_tests.c.

Data Fields
int count
size_t keylens[32]
uint8_t keys[32][4]

Function Documentation

◆ test_trie_alloc()

static void test_trie_alloc ( void  )
static

Definition at line 32 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_bit_prefix()

static void test_trie_bit_prefix ( void  )
static

Definition at line 315 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_insert_duplicate()

static void test_trie_insert_duplicate ( void  )
static

Definition at line 85 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_insert_lookup()

static void test_trie_insert_lookup ( void  )
static

Definition at line 45 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_longest_prefix()

static void test_trie_longest_prefix ( void  )
static

Definition at line 110 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_many()

static void test_trie_many ( void  )
static

Definition at line 267 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_remove()

static void test_trie_remove ( void  )
static

Definition at line 184 of file trie_tests.c.

+ Here is the call graph for this function:

◆ test_trie_walk()

static void test_trie_walk ( void  )
static

Definition at line 238 of file trie_tests.c.

+ Here is the call graph for this function:

◆ walk_callback()

static int walk_callback ( uint8_t const *  key,
size_t  keylen,
UNUSED void *  data,
void *  uctx 
)
static

Definition at line 222 of file trie_tests.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "trie_alloc", test_trie_alloc },
{ "trie_insert_lookup", test_trie_insert_lookup },
{ "trie_insert_duplicate", test_trie_insert_duplicate },
{ "trie_longest_prefix", test_trie_longest_prefix },
{ "trie_remove", test_trie_remove },
{ "trie_walk", test_trie_walk },
{ "trie_many", test_trie_many },
{ "trie_bit_prefix", test_trie_bit_prefix },
}
#define TEST_TERMINATOR
Definition acutest.h:64
static void test_trie_many(void)
Definition trie_tests.c:267
static void test_trie_insert_duplicate(void)
Definition trie_tests.c:85
static void test_trie_longest_prefix(void)
Definition trie_tests.c:110
static void test_trie_alloc(void)
Definition trie_tests.c:32
static void test_trie_bit_prefix(void)
Definition trie_tests.c:315
static void test_trie_insert_lookup(void)
Definition trie_tests.c:45
static void test_trie_remove(void)
Definition trie_tests.c:184
static void test_trie_walk(void)
Definition trie_tests.c:238

Definition at line 353 of file trie_tests.c.