The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
pair_legacy_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/pair_legacy.h>
+ Include dependency graph for pair_legacy_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 FILE * open_buffer_as_file (uint8_t const *buffer, size_t buffer_len)
 
static void test_fr_pair_list_afrom_file (void)
 
static void test_fr_pair_list_afrom_substr (void)
 
static void test_fr_pair_list_move_op (void)
 
static void test_init (void)
 Global initialisation. More...
 

Variables

 TEST_LIST
 

Detailed Description

Tests for a AVP manipulation and search API.

Author
Jorge Pereira jpere.nosp@m.ira@.nosp@m.freer.nosp@m.adiu.nosp@m.s.org

Definition in file pair_legacy_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 pair_tests_init() by "__attribute__((constructor));" reducing the test execution by 50% of the time.

Definition at line 30 of file pair_legacy_tests.c.

Function Documentation

◆ open_buffer_as_file()

static FILE* open_buffer_as_file ( uint8_t const *  buffer,
size_t  buffer_len 
)
static

Definition at line 125 of file pair_legacy_tests.c.

+ Here is the caller graph for this function:

◆ test_fr_pair_list_afrom_file()

static void test_fr_pair_list_afrom_file ( void  )
static

Definition at line 137 of file pair_legacy_tests.c.

+ Here is the call graph for this function:

◆ test_fr_pair_list_afrom_substr()

static void test_fr_pair_list_afrom_substr ( void  )
static

Definition at line 83 of file pair_legacy_tests.c.

+ Here is the call graph for this function:

◆ test_fr_pair_list_move_op()

static void test_fr_pair_list_move_op ( void  )
static

Definition at line 173 of file pair_legacy_tests.c.

+ Here is the call graph for this function:

◆ test_init()

static void test_init ( void  )
static

Global initialisation.

Definition at line 36 of file pair_legacy_tests.c.

Variable Documentation

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "fr_pair_list_afrom_substr", test_fr_pair_list_afrom_substr },
{ "fr_pair_list_afrom_file", test_fr_pair_list_afrom_file },
{ "fr_pair_list_move_op", test_fr_pair_list_move_op },
{ NULL }
}
static void test_fr_pair_list_afrom_file(void)
static void test_fr_pair_list_move_op(void)
static void test_fr_pair_list_afrom_substr(void)

Definition at line 218 of file pair_legacy_tests.c.