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

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

#include "acutest.h"
#include "acutest_helpers.h"
#include "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.
 

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.
 
static void test_pair_delete_by_da (void)
 
static void test_pair_delete_by_da_abort (void)
 
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_delete_tail (void)
 
static void test_pair_delete_tail_abort (void)
 
static void test_pair_edit_child_commit_parent_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_free_children (void)
 
static void test_pair_free_children_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)
 
static void test_pair_insert_after_tail (void)
 
static void test_pair_insert_after_tail_abort (void)
 
static void test_pair_insert_list_tail (void)
 
static void test_pair_insert_list_tail_abort (void)
 
static void test_pair_replace_pair (void)
 
static void test_pair_replace_pair_abort (void)
 
static void test_pair_replace_value (void)
 
static void test_pair_replace_value_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 106 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_by_da()

static void test_pair_delete_by_da ( void  )
static

Definition at line 877 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_by_da_abort()

static void test_pair_delete_by_da_abort ( void  )
static

Definition at line 919 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_head()

static void test_pair_delete_head ( void  )
static

Definition at line 127 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 160 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 192 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 230 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 271 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 314 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_tail()

static void test_pair_delete_tail ( void  )
static

Definition at line 813 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_delete_tail_abort()

static void test_pair_delete_tail_abort ( void  )
static

Definition at line 847 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_edit_child_commit_parent_abort()

static void test_pair_edit_child_commit_parent_abort ( void  )
static

Definition at line 1320 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 715 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 764 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 363 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 397 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 568 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 606 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_free_children()

static void test_pair_free_children ( void  )
static

Definition at line 1171 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_free_children_abort()

static void test_pair_free_children_abort ( void  )
static

Definition at line 1208 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 434 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 467 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 646 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 682 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 499 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 532 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_tail()

static void test_pair_insert_after_tail ( void  )
static

Definition at line 1111 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_after_tail_abort()

static void test_pair_insert_after_tail_abort ( void  )
static

Definition at line 1143 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_list_tail()

static void test_pair_insert_list_tail ( void  )
static

Definition at line 1244 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_insert_list_tail_abort()

static void test_pair_insert_list_tail_abort ( void  )
static

Definition at line 1284 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_replace_pair()

static void test_pair_replace_pair ( void  )
static

Definition at line 1037 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_replace_pair_abort()

static void test_pair_replace_pair_abort ( void  )
static

Definition at line 1075 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_replace_value()

static void test_pair_replace_value ( void  )
static

Definition at line 965 of file edit_tests.c.

+ Here is the call graph for this function:

◆ test_pair_replace_value_abort()

static void test_pair_replace_value_abort ( void  )
static

Definition at line 1001 of file edit_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST

Definition at line 1367 of file edit_tests.c.