Move ApplyPatch tests from test_utils.c to json.

This commit is contained in:
Max Bruckner committed 2017-04-13 20:15:25 +02:00
1 parent 8fd46d51b1
commit 49ebc85e7a
3 files changed
+101 -15

No files matched your search

-15
View File
@@ -114,21 +114,6 @@ int main(void)
}
cJSON_Delete(root);
printf("JSON Apply Patch Tests\n");
for (i = 0; i < 15; i++)
{
cJSON *object_to_be_patched = cJSON_Parse(patches[i][0]);
cJSON *patch = cJSON_Parse(patches[i][1]);
int err = cJSONUtils_ApplyPatches(object_to_be_patched, patch);
char *output = cJSON_Print(object_to_be_patched);
printf("Test %d (err %d):\n%s\n\n", i + 1, err, output);
free(output);
cJSON_Delete(object_to_be_patched);
cJSON_Delete(patch);
}
/* JSON Generate Patch tests: */
printf("JSON Generate Patch Tests\n");
for (i = 0; i < 15; i++)