cJSON_MakeDuplicateRecursive

This commit is contained in:
Max Bruckner
2018-02-03 17:49:37 +01:00
parent e8f56bd194
commit 409c2aaea7
3 changed files with 26 additions and 0 deletions

View File

@@ -241,6 +241,18 @@ static void allow_data_after_json_should_change_allow_data_after_json(void)
free(context);
}
static void make_duplicate_recursive_should_make_duplicate_recursive(void)
{
internal_context *context = (internal_context*)cJSON_CreateContext(NULL, NULL);
TEST_ASSERT_NOT_NULL(context);
context = (internal_context*)cJSON_MakeDuplicateRecursive(context, false);
TEST_ASSERT_NOT_NULL(context);
TEST_ASSERT_FALSE_MESSAGE(context->duplicate_recursive, "Duplicating is not set correctly.");
free(context);
}
int main(void)
{
UNITY_BEGIN();
@@ -260,6 +272,7 @@ int main(void)
RUN_TEST(set_format_should_set_format);
RUN_TEST(make_case_sensitive_should_change_case_sensitivity);
RUN_TEST(allow_data_after_json_should_change_allow_data_after_json);
RUN_TEST(make_duplicate_recursive_should_make_duplicate_recursive);
return UNITY_END();
}