parse_functions: Return booleans instead of pointers

This commit is contained in:
Max Bruckner
2017-03-14 14:17:35 +01:00
parent c9739c59fd
commit 87a204ed0b
9 changed files with 41 additions and 48 deletions

View File

@@ -59,7 +59,7 @@ static void assert_not_object(const char *json)
parsebuffer.length = strlen(json) + sizeof("");
parsebuffer.offset = 0;
TEST_ASSERT_NULL(parse_object(item, &parsebuffer, &error_pointer, &global_hooks));
TEST_ASSERT_FALSE(parse_object(item, &parsebuffer, &error_pointer, &global_hooks));
assert_is_invalid(item);
reset(item);
}
@@ -71,7 +71,7 @@ static void assert_parse_object(const char *json)
parsebuffer.length = strlen(json) + sizeof("");
parsebuffer.offset = 0;
TEST_ASSERT_NOT_NULL(parse_object(item, &parsebuffer, &error_pointer, &global_hooks));
TEST_ASSERT_TRUE(parse_object(item, &parsebuffer, &error_pointer, &global_hooks));
assert_is_object(item);
}