23 #include <freeradius-devel/util/acutest.h>
24 #include <freeradius-devel/util/acutest_helpers.h>
25 #include <freeradius-devel/util/size.h>
27 #ifdef HAVE_GPERFTOOLS_PROFILER_H
28 # include <gperftools/profiler.h>
38 #define test_str(_str) &FR_SBUFF_IN(_str, strlen(_str))
39 #define test_out(_buff) &FR_SBUFF_OUT(_buff, sizeof(_buff))
41 static char buff[
sizeof(
"18446744073709551615") + 3];
118 #if SIZE_MAX > UINT32_MAX
172 #if SIZE_MAX > UINT32_MAX
272 #if SIZE_MAX > UINT32_MAX
310 #if SIZE_MAX > UINT32_MAX
#define TEST_CHECK_SLEN(_got, _exp)
#define TEST_CHECK_LEN(_got, _exp)
#define TEST_CHECK_STRCMP(_got, _exp)
fr_slen_t fr_size_from_str(size_t *out, fr_sbuff_t *in)
Parse a size string with optional unit.
fr_slen_t fr_size_to_str(fr_sbuff_t *out, size_t in)
Print a size string with unit.
static void test_size_print_base2(void)
static void test_size_parse_bytes(void)
static void test_size_print_bytes(void)
static void test_size_parse_suffix_base10(void)
static char buff[sizeof("18446744073709551615")+3]
static void test_size_print_base10(void)
static void test_size_parse_suffix_base2(void)
PUBLIC int snprintf(char *string, size_t length, char *format, va_alist)