The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
size_tests.c File Reference

Size printing/parsing. More...

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

Go to the source code of this file.

Macros

#define test_out(_buff)   &FR_SBUFF_OUT(_buff, sizeof(_buff))
 
#define test_str(_str)   &FR_SBUFF_IN(_str, strlen(_str))
 

Functions

static void test_size_parse_bytes (void)
 
static void test_size_parse_suffix_base10 (void)
 
static void test_size_parse_suffix_base2 (void)
 
static void test_size_print_base10 (void)
 
static void test_size_print_base2 (void)
 
static void test_size_print_bytes (void)
 

Variables

static char buff [sizeof("18446744073709551615")+3]
 
 TEST_LIST
 

Detailed Description

Size printing/parsing.

Definition in file size_tests.c.

Macro Definition Documentation

◆ test_out

#define test_out (   _buff)    &FR_SBUFF_OUT(_buff, sizeof(_buff))

Definition at line 39 of file size_tests.c.

◆ test_str

#define test_str (   _str)    &FR_SBUFF_IN(_str, strlen(_str))

Definition at line 38 of file size_tests.c.

Function Documentation

◆ test_size_parse_bytes()

static void test_size_parse_bytes ( void  )
static

Definition at line 43 of file size_tests.c.

+ Here is the call graph for this function:

◆ test_size_parse_suffix_base10()

static void test_size_parse_suffix_base10 ( void  )
static

Definition at line 132 of file size_tests.c.

+ Here is the call graph for this function:

◆ test_size_parse_suffix_base2()

static void test_size_parse_suffix_base2 ( void  )
static

Definition at line 82 of file size_tests.c.

+ Here is the call graph for this function:

◆ test_size_print_base10()

static void test_size_print_base10 ( void  )
static

Definition at line 293 of file size_tests.c.

+ Here is the call graph for this function:

◆ test_size_print_base2()

static void test_size_print_base2 ( void  )
static

Definition at line 258 of file size_tests.c.

+ Here is the call graph for this function:

◆ test_size_print_bytes()

static void test_size_print_bytes ( void  )
static

Definition at line 186 of file size_tests.c.

+ Here is the call graph for this function:

Variable Documentation

◆ buff

char buff[sizeof("18446744073709551615")+3]
static

Definition at line 41 of file size_tests.c.

◆ TEST_LIST

TEST_LIST
Initial value:
= {
{ "parse_bytes", test_size_parse_bytes },
{ "parse_suffix_base2", test_size_parse_suffix_base2 },
{ "parse_suffix_base10", test_size_parse_suffix_base10 },
{ "print_bytes", test_size_print_bytes },
{ "print_base2", test_size_print_base2 },
{ "print_base10", test_size_print_base10 },
{ NULL }
}
static void test_size_print_base2(void)
Definition: size_tests.c:258
static void test_size_parse_bytes(void)
Definition: size_tests.c:43
static void test_size_print_bytes(void)
Definition: size_tests.c:186
static void test_size_parse_suffix_base10(void)
Definition: size_tests.c:132
static void test_size_print_base10(void)
Definition: size_tests.c:293
static void test_size_parse_suffix_base2(void)
Definition: size_tests.c:82

Definition at line 327 of file size_tests.c.