Move print depth into printbuffer

This commit is contained in:
Max Bruckner
2017-04-27 02:10:03 +02:00
parent e0d3a8a265
commit 79f30800ec
6 changed files with 37 additions and 32 deletions

View File

@@ -32,7 +32,7 @@ static void assert_print_value(const char *input)
{
unsigned char printed[1024];
cJSON item[1];
printbuffer buffer;
printbuffer buffer = { 0, 0, 0, 0, 0 };
parse_buffer parsebuffer = { 0, 0, 0, 0 };
buffer.buffer = printed;
buffer.length = sizeof(printed);
@@ -46,7 +46,7 @@ static void assert_print_value(const char *input)
TEST_ASSERT_TRUE_MESSAGE(parse_value(item, &parsebuffer, &global_hooks), "Failed to parse value.");
TEST_ASSERT_TRUE_MESSAGE(print_value(item, 0, false, &buffer, &global_hooks), "Failed to print value.");
TEST_ASSERT_TRUE_MESSAGE(print_value(item, false, &buffer, &global_hooks), "Failed to print value.");
TEST_ASSERT_EQUAL_STRING_MESSAGE(input, buffer.buffer, "Printed value is not as expected.");
reset(item);