mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
cJSON_MakeDuplicateRecursive
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user