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

Tests for cf_file, cf_util, and cf_parse. More...

#include <freeradius-devel/util/test/acutest.h>
#include <freeradius-devel/util/test/acutest_helpers.h>
#include <freeradius-devel/server/cf_file.h>
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/cf_priv.h>
+ Include dependency graph for cf_tests.c:

Go to the source code of this file.

Macros

#define TEST_INIT   test_init()
 

Functions

static void test_cf_root (void)
 
static void test_data_add_find (void)
 
static void test_data_find_missing (void)
 
static void test_data_remove (void)
 
static void test_expand_missing_ref (void)
 
static void test_expand_nested_ref (void)
 
static void test_expand_no_variables (void)
 
static void test_expand_section_ref (void)
 
static void test_filename_lineno (void)
 
static void test_filename_set (void)
 
static void test_init (void)
 Global initialisation.
 
static void test_item_free_children (void)
 
static void test_item_mark_parsed (void)
 
static void test_item_next_mixed (void)
 
static void test_item_remove_pair (void)
 
static void test_item_remove_section (void)
 
static void test_lineno_set (void)
 
static void test_pair_alloc_basic (void)
 
static void test_pair_alloc_no_value (void)
 
static void test_pair_alloc_operators (void)
 
static void test_pair_alloc_quoted (void)
 
static void test_pair_count (void)
 
static void test_pair_count_descendents (void)
 
static void test_pair_dup (void)
 
static void test_pair_find_basic (void)
 
static void test_pair_find_missing (void)
 
static void test_pair_find_next (void)
 
static void test_pair_first_next (void)
 
static void test_pair_in_table_found (void)
 
static void test_pair_in_table_invalid (void)
 
static void test_pair_prev (void)
 
static void test_pair_replace (void)
 
static void test_pair_to_item_roundtrip (void)
 
static void test_pair_values_concat (void)
 
static void test_pair_values_concat_missing (void)
 
static void test_reference_item_missing (void)
 
static void test_reference_item_pair (void)
 
static void test_reference_item_section (void)
 
static void test_section_alloc_name1_name2 (void)
 
static void test_section_alloc_name1_only (void)
 
static void test_section_alloc_parent (void)
 
static void test_section_dup_basic (void)
 
static void test_section_dup_rename (void)
 
static void test_section_find_child (void)
 
static void test_section_find_missing (void)
 
static void test_section_find_name1_name2 (void)
 
static void test_section_find_next (void)
 
static void test_section_first_next (void)
 
static void test_section_name_cmp (void)
 
static void test_section_prev (void)
 
static void test_section_to_item_roundtrip (void)
 
static void test_section_value_find (void)
 

Variables

static TALLOC_CTX * autofree
 
 TEST_LIST
 
static fr_table_num_sorted_t const test_table []
 
static size_t test_table_len = NUM_ELEMENTS(test_table)
 

Detailed Description

Tests for cf_file, cf_util, and cf_parse.

Definition in file cf_tests.c.

Macro Definition Documentation

◆ TEST_INIT

#define TEST_INIT   test_init()

Definition at line 25 of file cf_tests.c.

Function Documentation

◆ test_cf_root()

static void test_cf_root ( void  )
static

Definition at line 844 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_data_add_find()

static void test_data_add_find ( void  )
static

Definition at line 869 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_data_find_missing()

static void test_data_find_missing ( void  )
static

Definition at line 893 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_data_remove()

static void test_data_remove ( void  )
static

Definition at line 907 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_expand_missing_ref()

static void test_expand_missing_ref ( void  )
static

Definition at line 1005 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_expand_nested_ref()

static void test_expand_nested_ref ( void  )
static

Definition at line 979 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_expand_no_variables()

static void test_expand_no_variables ( void  )
static

Definition at line 935 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_expand_section_ref()

static void test_expand_section_ref ( void  )
static

Definition at line 956 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_filename_lineno()

static void test_filename_lineno ( void  )
static

Definition at line 799 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_filename_set()

static void test_filename_set ( void  )
static

Definition at line 818 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_init()

static void test_init ( void  )
static

Global initialisation.

Definition at line 37 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_item_free_children()

static void test_item_free_children ( void  )
static

Definition at line 662 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_item_mark_parsed()

static void test_item_mark_parsed ( void  )
static

Definition at line 684 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_item_next_mixed()

static void test_item_next_mixed ( void  )
static

Definition at line 631 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_item_remove_pair()

static void test_item_remove_pair ( void  )
static

Definition at line 592 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_item_remove_section()

static void test_item_remove_section ( void  )
static

Definition at line 612 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_lineno_set()

static void test_lineno_set ( void  )
static

Definition at line 831 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_alloc_basic()

static void test_pair_alloc_basic ( void  )
static

Definition at line 139 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_alloc_no_value()

static void test_pair_alloc_no_value ( void  )
static

Definition at line 174 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_alloc_operators()

static void test_pair_alloc_operators ( void  )
static

Definition at line 191 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_alloc_quoted()

static void test_pair_alloc_quoted ( void  )
static

Definition at line 157 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_count()

static void test_pair_count ( void  )
static

Definition at line 546 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_count_descendents()

static void test_pair_count_descendents ( void  )
static

Definition at line 566 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_dup()

static void test_pair_dup ( void  )
static

Definition at line 768 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_find_basic()

static void test_pair_find_basic ( void  )
static

Definition at line 430 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_find_missing()

static void test_pair_find_missing ( void  )
static

Definition at line 448 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_find_next()

static void test_pair_find_next ( void  )
static

Definition at line 464 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_first_next()

static void test_pair_first_next ( void  )
static

Definition at line 490 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_in_table_found()

static void test_pair_in_table_found ( void  )
static

Definition at line 1144 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_in_table_invalid()

static void test_pair_in_table_invalid ( void  )
static

Definition at line 1164 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_prev()

static void test_pair_prev ( void  )
static

Definition at line 522 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_replace()

static void test_pair_replace ( void  )
static

Definition at line 214 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_to_item_roundtrip()

static void test_pair_to_item_roundtrip ( void  )
static

Definition at line 233 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_values_concat()

static void test_pair_values_concat ( void  )
static

Definition at line 1030 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_pair_values_concat_missing()

static void test_pair_values_concat_missing ( void  )
static

Definition at line 1055 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_reference_item_missing()

static void test_reference_item_missing ( void  )
static

Definition at line 1119 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_reference_item_pair()

static void test_reference_item_pair ( void  )
static

Definition at line 1076 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_reference_item_section()

static void test_reference_item_section ( void  )
static

Definition at line 1098 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_alloc_name1_name2()

static void test_section_alloc_name1_name2 ( void  )
static

Definition at line 73 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_alloc_name1_only()

static void test_section_alloc_name1_only ( void  )
static

Definition at line 59 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_alloc_parent()

static void test_section_alloc_parent ( void  )
static

Definition at line 86 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_dup_basic()

static void test_section_dup_basic ( void  )
static

Definition at line 708 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_dup_rename()

static void test_section_dup_rename ( void  )
static

Definition at line 742 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_find_child()

static void test_section_find_child ( void  )
static

Definition at line 259 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_find_missing()

static void test_section_find_missing ( void  )
static

Definition at line 306 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_find_name1_name2()

static void test_section_find_name1_name2 ( void  )
static

Definition at line 284 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_find_next()

static void test_section_find_next ( void  )
static

Definition at line 321 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_first_next()

static void test_section_first_next ( void  )
static

Definition at line 346 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_name_cmp()

static void test_section_name_cmp ( void  )
static

Definition at line 102 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_prev()

static void test_section_prev ( void  )
static

Definition at line 377 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_to_item_roundtrip()

static void test_section_to_item_roundtrip ( void  )
static

Definition at line 116 of file cf_tests.c.

+ Here is the call graph for this function:

◆ test_section_value_find()

static void test_section_value_find ( void  )
static

Definition at line 405 of file cf_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ autofree

TALLOC_CTX* autofree
static

Definition at line 33 of file cf_tests.c.

◆ TEST_LIST

TEST_LIST

Definition at line 1184 of file cf_tests.c.

◆ test_table

fr_table_num_sorted_t const test_table[]
static
Initial value:
= {
{ L("bar"), 2 },
{ L("foo"), 1 },
}
#define L(_str)
Helper for initialising arrays of string literals.
Definition build.h:209

Definition at line 1138 of file cf_tests.c.

◆ test_table_len

size_t test_table_len = NUM_ELEMENTS(test_table)
static

Definition at line 1142 of file cf_tests.c.