Move 'hooks' parameter into buffers (parse/print)

This commit is contained in:
Max Bruckner
2017-04-27 02:48:28 +02:00
parent c4c217f2ce
commit 949c083315
11 changed files with 122 additions and 98 deletions

View File

@@ -43,10 +43,12 @@ static void assert_is_value(cJSON *value_item, int type)
static void assert_parse_value(const char *string, int type)
{
parse_buffer buffer = { 0, 0, 0, 0 };
parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0 } };
buffer.content = (const unsigned char*) string;
buffer.length = strlen(string) + sizeof("");
TEST_ASSERT_TRUE(parse_value(item, &buffer, &global_hooks));
buffer.hooks = global_hooks;
TEST_ASSERT_TRUE(parse_value(item, &buffer));
assert_is_value(item, type);
}