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

Tests for value box functions. More...

#include "acutest.h"
#include "acutest_helpers.h"
#include <freeradius-devel/util/value.h>
+ Include dependency graph for value_tests.c:

Go to the source code of this file.

Functions

static void test_as_uint64 (void)
 
static void test_asprintf (void)
 
static void test_bstrndup (void)
 
static void test_cast_bool_to_uint32 (void)
 
static void test_cast_in_place_uint32_to_string (void)
 
static void test_cast_in_place_uint32_to_uint64 (void)
 
static void test_cast_int32_to_int64 (void)
 
static void test_cast_same_type (void)
 
static void test_cast_string_to_uint32 (void)
 
static void test_cast_uint32_to_bool (void)
 
static void test_cast_uint32_to_string (void)
 
static void test_cast_uint32_to_uint64 (void)
 
static void test_cast_uint8_to_uint32 (void)
 
static void test_clear (void)
 
static void test_clear_string (void)
 
static void test_cmp_bool (void)
 
static void test_cmp_different_types (void)
 
static void test_cmp_float64 (void)
 
static void test_cmp_int32 (void)
 
static void test_cmp_octets (void)
 
static void test_cmp_octets_length (void)
 
static void test_cmp_op_eq (void)
 
static void test_cmp_op_ge (void)
 
static void test_cmp_op_gt (void)
 
static void test_cmp_op_le (void)
 
static void test_cmp_op_lt (void)
 
static void test_cmp_op_ne (void)
 
static void test_cmp_string (void)
 
static void test_cmp_uint32_equal (void)
 
static void test_cmp_uint32_less (void)
 
static void test_copy_octets (void)
 
static void test_copy_preserves_tainted (void)
 
static void test_copy_string (void)
 
static void test_copy_uint32 (void)
 
static void test_from_str_bool (void)
 
static void test_from_str_float64 (void)
 
static void test_from_str_int32 (void)
 
static void test_from_str_octets (void)
 
static void test_from_str_string (void)
 
static void test_from_str_uint32 (void)
 
static void test_hash_different_values (void)
 
static void test_hash_same_values (void)
 
static void test_hash_string (void)
 
static void test_increment_int32 (void)
 
static void test_increment_uint32 (void)
 
static void test_increment_uint8_overflow (void)
 
static void test_init (void)
 
static void test_memdup (void)
 
static void test_network_bool (void)
 
static void test_network_int32 (void)
 
static void test_network_length (void)
 
static void test_network_uint32 (void)
 
static void test_network_uint64 (void)
 
static void test_print_bool (void)
 
static void test_print_int32_negative (void)
 
static void test_print_octets (void)
 
static void test_print_string (void)
 
static void test_print_uint32 (void)
 
static void test_round_trip_bool (void)
 
static void test_round_trip_int64 (void)
 
static void test_round_trip_network_uint32 (void)
 
static void test_round_trip_uint32 (void)
 
static void test_strdup (void)
 
static void test_tainted_flag (void)
 
static void test_truthy_bool (void)
 
static void test_truthy_octets (void)
 
static void test_truthy_string (void)
 
static void test_truthy_uint32 (void)
 

Variables

static TALLOC_CTX * autofree
 
 TEST_LIST
 

Detailed Description

Tests for value box functions.

Definition in file value_tests.c.

Function Documentation

◆ test_as_uint64()

static void test_as_uint64 ( void  )
static

Definition at line 627 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_asprintf()

static void test_asprintf ( void  )
static

Definition at line 464 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_bstrndup()

static void test_bstrndup ( void  )
static

Definition at line 475 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_bool_to_uint32()

static void test_cast_bool_to_uint32 ( void  )
static

Definition at line 329 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_in_place_uint32_to_string()

static void test_cast_in_place_uint32_to_string ( void  )
static

Definition at line 373 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_in_place_uint32_to_uint64()

static void test_cast_in_place_uint32_to_uint64 ( void  )
static

Definition at line 362 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_int32_to_int64()

static void test_cast_int32_to_int64 ( void  )
static

Definition at line 293 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_same_type()

static void test_cast_same_type ( void  )
static

Definition at line 317 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_string_to_uint32()

static void test_cast_string_to_uint32 ( void  )
static

Definition at line 278 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_uint32_to_bool()

static void test_cast_uint32_to_bool ( void  )
static

Definition at line 344 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_uint32_to_string()

static void test_cast_uint32_to_string ( void  )
static

Definition at line 264 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_uint32_to_uint64()

static void test_cast_uint32_to_uint64 ( void  )
static

Definition at line 252 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cast_uint8_to_uint32()

static void test_cast_uint8_to_uint32 ( void  )
static

Definition at line 305 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_clear()

static void test_clear ( void  )
static

Definition at line 650 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_clear_string()

static void test_clear_string ( void  )
static

Definition at line 661 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_bool()

static void test_cmp_bool ( void  )
static

Definition at line 144 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_different_types()

static void test_cmp_different_types ( void  )
static

Definition at line 158 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_float64()

static void test_cmp_float64 ( void  )
static

Definition at line 83 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_int32()

static void test_cmp_int32 ( void  )
static

Definition at line 69 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_octets()

static void test_cmp_octets ( void  )
static

Definition at line 115 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_octets_length()

static void test_cmp_octets_length ( void  )
static

Definition at line 129 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_op_eq()

static void test_cmp_op_eq ( void  )
static

Definition at line 172 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_op_ge()

static void test_cmp_op_ge ( void  )
static

Definition at line 235 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_op_gt()

static void test_cmp_op_gt ( void  )
static

Definition at line 210 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_op_le()

static void test_cmp_op_le ( void  )
static

Definition at line 221 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_op_lt()

static void test_cmp_op_lt ( void  )
static

Definition at line 198 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_op_ne()

static void test_cmp_op_ne ( void  )
static

Definition at line 185 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_string()

static void test_cmp_string ( void  )
static

Definition at line 97 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_uint32_equal()

static void test_cmp_uint32_equal ( void  )
static

Definition at line 48 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_cmp_uint32_less()

static void test_cmp_uint32_less ( void  )
static

Definition at line 58 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_copy_octets()

static void test_copy_octets ( void  )
static

Definition at line 419 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_copy_preserves_tainted()

static void test_copy_preserves_tainted ( void  )
static

Definition at line 438 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_copy_string()

static void test_copy_string ( void  )
static

Definition at line 401 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_copy_uint32()

static void test_copy_uint32 ( void  )
static

Definition at line 389 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_from_str_bool()

static void test_from_str_bool ( void  )
static

Definition at line 911 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_from_str_float64()

static void test_from_str_float64 ( void  )
static

Definition at line 921 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_from_str_int32()

static void test_from_str_int32 ( void  )
static

Definition at line 900 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_from_str_octets()

static void test_from_str_octets ( void  )
static

Definition at line 932 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_from_str_string()

static void test_from_str_string ( void  )
static

Definition at line 945 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_from_str_uint32()

static void test_from_str_uint32 ( void  )
static

Definition at line 889 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_hash_different_values()

static void test_hash_different_values ( void  )
static

Definition at line 517 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_hash_same_values()

static void test_hash_same_values ( void  )
static

Definition at line 507 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_hash_string()

static void test_hash_string ( void  )
static

Definition at line 527 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_increment_int32()

static void test_increment_int32 ( void  )
static

Definition at line 614 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_increment_uint32()

static void test_increment_uint32 ( void  )
static

Definition at line 594 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_increment_uint8_overflow()

static void test_increment_uint8_overflow ( void  )
static

Definition at line 604 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_init()

static void test_init ( void  )
static

Definition at line 30 of file value_tests.c.

◆ test_memdup()

static void test_memdup ( void  )
static

Definition at line 491 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_network_bool()

static void test_network_bool ( void  )
static

Definition at line 770 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_network_int32()

static void test_network_int32 ( void  )
static

Definition at line 743 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_network_length()

static void test_network_length ( void  )
static

Definition at line 791 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_network_uint32()

static void test_network_uint32 ( void  )
static

Definition at line 689 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_network_uint64()

static void test_network_uint64 ( void  )
static

Definition at line 718 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_print_bool()

static void test_print_bool ( void  )
static

Definition at line 852 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_print_int32_negative()

static void test_print_int32_negative ( void  )
static

Definition at line 824 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_print_octets()

static void test_print_octets ( void  )
static

Definition at line 871 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_print_string()

static void test_print_string ( void  )
static

Definition at line 837 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_print_uint32()

static void test_print_uint32 ( void  )
static

Definition at line 811 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_round_trip_bool()

static void test_round_trip_bool ( void  )
static

Definition at line 992 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_round_trip_int64()

static void test_round_trip_int64 ( void  )
static

Definition at line 976 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_round_trip_network_uint32()

static void test_round_trip_network_uint32 ( void  )
static

Definition at line 1008 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_round_trip_uint32()

static void test_round_trip_uint32 ( void  )
static

Definition at line 960 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_strdup()

static void test_strdup ( void  )
static

Definition at line 452 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_tainted_flag()

static void test_tainted_flag ( void  )
static

Definition at line 675 of file value_tests.c.

◆ test_truthy_bool()

static void test_truthy_bool ( void  )
static

Definition at line 543 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_truthy_octets()

static void test_truthy_octets ( void  )
static

Definition at line 578 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_truthy_string()

static void test_truthy_string ( void  )
static

Definition at line 565 of file value_tests.c.

+ Here is the call graph for this function:

◆ test_truthy_uint32()

static void test_truthy_uint32 ( void  )
static

Definition at line 554 of file value_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ autofree

TALLOC_CTX* autofree
static

Definition at line 28 of file value_tests.c.

◆ TEST_LIST

TEST_LIST

Definition at line 1029 of file value_tests.c.