The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
edit_tests.c File Reference

Tests for a AVP manipulation and search API. More...

#include <freeradius-devel/util/acutest.h>
#include <freeradius-devel/util/acutest_helpers.h>
#include <freeradius-devel/util/pair_test_helpers.h>
#include <freeradius-devel/util/conf.h>
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/util/edit.h>
+ Include dependency graph for edit_tests.c:

Go to the source code of this file.

Macros

#define USE_CONSTRUCTOR
 The 'TEST_INIT' macro provided by 'acutest.h' allowing to register a function to be called before call the unit tests. More...
 

Functions

static void add_pairs (fr_pair_list_t *local_pairs)
 
static void expect3 (fr_pair_list_t *local_pairs)
 
static void test_init (void)
 Global initialisation. More...
 
static void test_pair_delete_head (void)
 
static void test_pair_delete_head_abort (void)
 
static void test_pair_delete_middle (void)
 
static void test_pair_delete_middle_abort (void)
 
static void test_pair_delete_multiple (void)
 
static void test_pair_delete_multiple_abort (void)
 
static void test_pair_edit_child_value (void)
 
static void test_pair_edit_child_value_abort (void)
 
static void test_pair_edit_value (void)
 
static void test_pair_edit_value_abort (void)
 
static void test_pair_edit_value_delete (void)
 
static void test_pair_edit_value_delete_abort (void)
 
static void test_pair_insert_after_head (void)
 
static void test_pair_insert_after_head_abort (void)
 
static void test_pair_insert_after_head_delete (void)
 
static void test_pair_insert_after_head_delete_abort (void)
 
static void test_pair_insert_after_middle (void)
 
static void test_pair_insert_after_middle_abort (void)
 

Variables

 TEST_LIST
 

Detailed Description

Tests for a AVP manipulation and search API.

Author
Alan DeKok (aland.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)

Definition in file edit_tests.c.

Macro Definition Documentation

◆ USE_CONSTRUCTOR

#define USE_CONSTRUCTOR

The 'TEST_INIT' macro provided by 'acutest.h' allowing to register a function to be called before call the unit tests.

Therefore, It calls the function ALL THE TIME causing an overhead. That is why we are initializing test_init() by "__attribute__((constructor));" reducing the test execution by 50% of the time.

Definition at line 30 of file edit_tests.c.

Function Documentation

◆ add_pairs()

static void add_pairs ( fr_pair_list_t local_pairs)
static

Definition at line 82 of file edit_tests.c.

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

◆ expect3()

static void expect3 ( fr_pair_list_t local_pairs)
static

Definition at line 109 of file edit_tests.c.

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

◆ test_init()

static void test_init ( void  )
static

Global initialisation.

Definition at line 36 of file edit_tests.c.

◆ test_pair_delete_head()

static void test_pair_delete_head ( void  )
static

Definition at line 130 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_head_abort()

static void test_pair_delete_head_abort ( void  )
static

Definition at line 163 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_middle()

static void test_pair_delete_middle ( void  )
static

Definition at line 195 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_middle_abort()

static void test_pair_delete_middle_abort ( void  )
static

Definition at line 233 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_multiple()

static void test_pair_delete_multiple ( void  )
static

Definition at line 274 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_multiple_abort()

static void test_pair_delete_multiple_abort ( void  )
static

Definition at line 317 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_child_value()

static void test_pair_edit_child_value ( void  )
static

Definition at line 718 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_child_value_abort()

static void test_pair_edit_child_value_abort ( void  )
static

Definition at line 767 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_value()

static void test_pair_edit_value ( void  )
static

Definition at line 366 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_value_abort()

static void test_pair_edit_value_abort ( void  )
static

Definition at line 400 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_value_delete()

static void test_pair_edit_value_delete ( void  )
static

Definition at line 571 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_value_delete_abort()

static void test_pair_edit_value_delete_abort ( void  )
static

Definition at line 609 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_head()

static void test_pair_insert_after_head ( void  )
static

Definition at line 437 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_head_abort()

static void test_pair_insert_after_head_abort ( void  )
static

Definition at line 470 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_head_delete()

static void test_pair_insert_after_head_delete ( void  )
static

Definition at line 649 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_head_delete_abort()

static void test_pair_insert_after_head_delete_abort ( void  )
static

Definition at line 685 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_middle()

static void test_pair_insert_after_middle ( void  )
static

Definition at line 502 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_middle_abort()

static void test_pair_insert_after_middle_abort ( void  )
static

Definition at line 535 of file edit_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST

Definition at line 816 of file edit_tests.c.