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 78 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 102 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 873 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 915 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 123 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 156 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 188 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 226 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 267 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 310 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 809 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 843 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 1316 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 711 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 760 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 359 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 393 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 564 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 602 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 1167 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 1204 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 430 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 463 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 642 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 678 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 495 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 528 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 1107 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 1139 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 1240 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 1280 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 1033 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 1071 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 961 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 997 of file edit_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ TEST_LIST

TEST_LIST

Definition at line 1363 of file edit_tests.c.