Put buffer_size into internal_configuration

This commit is contained in:
Max Bruckner
2018-02-01 00:00:36 +01:00
parent 27977adc93
commit 7030dc7c5b
12 changed files with 37 additions and 46 deletions

View File

@ -418,7 +418,7 @@ static void *failing_realloc(void *pointer, size_t size)
static void ensure_should_fail_on_failed_realloc(void)
{
printbuffer buffer = {NULL, 10, 0, 0, false, {false, &malloc, &free, &failing_realloc}};
printbuffer buffer = {NULL, 10, 0, 0, false, {256, false, &malloc, &free, &failing_realloc}};
buffer.buffer = (unsigned char*)malloc(100);
TEST_ASSERT_NOT_NULL(buffer.buffer);
@ -428,7 +428,7 @@ static void ensure_should_fail_on_failed_realloc(void)
static void skip_utf8_bom_should_skip_bom(void)
{
const unsigned char string[] = "\xEF\xBB\xBF{}";
parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0, 0 } };
parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0, 0, 0 } };
buffer.content = string;
buffer.length = sizeof(string);
buffer.configuration = global_configuration;
@ -440,7 +440,7 @@ static void skip_utf8_bom_should_skip_bom(void)
static void skip_utf8_bom_should_not_skip_bom_if_not_at_beginning(void)
{
const unsigned char string[] = " \xEF\xBB\xBF{}";
parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0, 0 } };
parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0, 0, 0 } };
buffer.content = string;
buffer.length = sizeof(string);
buffer.configuration = global_configuration;