OpenVPN
|
#include "syshead.h"
#include <setjmp.h>
#include <cmocka.h>
#include "buffer.h"
#include "buffer.c"
#include "test_common.h"
Go to the source code of this file.
Data Structures | |
struct | test_buffer_list_aggregate_ctx |
Macros | |
#define | testsep "," |
#define | testnosep "" |
#define | teststr1 "one" |
#define | teststr2 "two" |
#define | teststr3 "three" |
#define | teststr4 "four" |
#define | assert_buf_equals_str(buf, str) |
#define assert_buf_equals_str | ( | buf, | |
str | |||
) |
Definition at line 54 of file test_buffer.c.
#define testnosep "" |
Definition at line 48 of file test_buffer.c.
#define testsep "," |
Definition at line 47 of file test_buffer.c.
#define teststr1 "one" |
Definition at line 49 of file test_buffer.c.
#define teststr2 "two" |
Definition at line 50 of file test_buffer.c.
#define teststr3 "three" |
Definition at line 51 of file test_buffer.c.
#define teststr4 "four" |
Definition at line 52 of file test_buffer.c.
int main | ( | void | ) |
Definition at line 431 of file test_buffer.c.
References openvpn_unit_test_setup(), test_buffer_format_hex_ex(), test_buffer_free_gc_one(), test_buffer_free_gc_two(), test_buffer_gc_realloc(), test_buffer_list_aggregate_separator_all(), test_buffer_list_aggregate_separator_empty(), test_buffer_list_aggregate_separator_emptybuffers(), test_buffer_list_aggregate_separator_noop(), test_buffer_list_aggregate_separator_nosep(), test_buffer_list_aggregate_separator_two(), test_buffer_list_aggregate_separator_zerolen(), test_buffer_list_setup(), test_buffer_list_teardown(), test_buffer_printf_catrunc(), test_buffer_strprefix(), test_character_class(), test_character_string_mod_buf(), and test_snprintf().
|
static |
Definition at line 84 of file test_buffer.c.
References format_hex_ex(), gc_free(), and gc_new().
Referenced by main().
|
static |
Definition at line 252 of file test_buffer.c.
References alloc_buf_gc(), buffer::data, free_buf_gc(), gc_free(), gc_new(), and gc_arena::list.
Referenced by main().
|
static |
Definition at line 265 of file test_buffer.c.
References alloc_buf_gc(), buffer::data, free_buf_gc(), gc_free(), gc_new(), gc_arena::list, and gc_entry::next.
Referenced by main().
|
static |
Definition at line 295 of file test_buffer.c.
References gc_free(), gc_new(), and gc_realloc().
Referenced by main().
|
static |
Definition at line 201 of file test_buffer.c.
References assert_buf_equals_str, buffer_list_aggregate_separator(), buffer_list_peek(), test_buffer_list_aggregate_ctx::one_two_three, buffer_list::size, testsep, teststr1, teststr2, and teststr3.
Referenced by main().
|
static |
Definition at line 163 of file test_buffer.c.
References buffer_list_aggregate_separator(), test_buffer_list_aggregate_ctx::empty, buffer_list::head, and testsep.
Referenced by main().
|
static |
Definition at line 239 of file test_buffer.c.
References BLEN, buffer_list_aggregate_separator(), buffer_list_peek(), test_buffer_list_aggregate_ctx::empty_buffers, buffer_list::size, and testnosep.
Referenced by main().
|
static |
Definition at line 173 of file test_buffer.c.
References assert_buf_equals_str, buffer_list_aggregate_separator(), buffer_list_peek(), test_buffer_list_aggregate_ctx::one_two_three, buffer_list::size, testsep, and teststr1.
Referenced by main().
|
static |
Definition at line 214 of file test_buffer.c.
References assert_buf_equals_str, buffer_list_aggregate_separator(), buffer_list_peek(), test_buffer_list_aggregate_ctx::one_two_three, buffer_list::size, testnosep, teststr1, teststr2, and teststr3.
Referenced by main().
|
static |
Definition at line 185 of file test_buffer.c.
References assert_buf_equals_str, buffer_list_aggregate_separator(), buffer_list_peek(), test_buffer_list_aggregate_ctx::one_two_three, buffer_list::size, testsep, teststr1, and teststr2.
Referenced by main().
|
static |
Definition at line 226 of file test_buffer.c.
References assert_buf_equals_str, buffer_list_aggregate_separator(), buffer_list_peek(), buffer_list::size, testnosep, and test_buffer_list_aggregate_ctx::zero_length_strings.
Referenced by main().
|
static |
Definition at line 126 of file test_buffer.c.
References buffer_list_new(), buffer_list_push(), buffer_list_push_data(), test_buffer_list_aggregate_ctx::empty, test_buffer_list_aggregate_ctx::empty_buffers, test_buffer_list_aggregate_ctx::one_two_three, teststr1, teststr2, teststr3, and test_buffer_list_aggregate_ctx::zero_length_strings.
Referenced by main().
|
static |
Definition at line 150 of file test_buffer.c.
References buffer_list_free(), test_buffer_list_aggregate_ctx::empty, test_buffer_list_aggregate_ctx::empty_buffers, test_buffer_list_aggregate_ctx::one_two_three, and test_buffer_list_aggregate_ctx::zero_length_strings.
Referenced by main().
|
static |
Definition at line 59 of file test_buffer.c.
References alloc_buf_gc(), assert_buf_equals_str, buf_catrunc(), buf_printf(), gc_free(), and gc_new().
Referenced by main().
|
static |
|
static |
Definition at line 324 of file test_buffer.c.
References CC_ALPHA, CC_ANY, CC_ASTERISK, CC_BACKSLASH, CC_BLANK, CC_DIGIT, CC_DOUBLE_QUOTE, CC_NEWLINE, CC_PRINT, CC_SINGLE_QUOTE, and string_mod().
Referenced by main().
|
static |
Definition at line 359 of file test_buffer.c.
References alloc_buf_gc(), buf_inc_len(), buf_write(), CC_ALNUM, CC_DIGIT, CC_NULL, CC_SPACE, gc_free(), gc_new(), and string_check_buf().
Referenced by main().
|
static |
Definition at line 381 of file test_buffer.c.
Referenced by main().