MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / cJSON_add_array_should_add_array

Function cJSON_add_array_should_add_array

tests/cjson_add.c:390–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390static void cJSON_add_array_should_add_array(void)
391{
392 cJSON *root = cJSON_CreateObject();
393 cJSON *array = NULL;
394
395 cJSON_AddArrayToObject(root, "array");
396 TEST_ASSERT_NOT_NULL(array = cJSON_GetObjectItemCaseSensitive(root, "array"));
397 TEST_ASSERT_EQUAL_INT(array->type, cJSON_Array);
398
399 cJSON_Delete(root);
400}
401
402static void cjson_add_array_should_fail_with_null_pointers(void)
403{

Callers

nothing calls this directly

Calls 4

cJSON_CreateObjectFunction · 0.85
cJSON_AddArrayToObjectFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…