MCPcopy Create free account
hub / github.com/DaveGamble/cJSON / cJSON_add_object_should_add_object

Function cJSON_add_object_should_add_object

tests/cjson_add.c:355–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355static void cJSON_add_object_should_add_object(void)
356{
357 cJSON *root = cJSON_CreateObject();
358 cJSON *object = NULL;
359
360 cJSON_AddObjectToObject(root, "object");
361 TEST_ASSERT_NOT_NULL(object = cJSON_GetObjectItemCaseSensitive(root, "object"));
362 TEST_ASSERT_EQUAL_INT(object->type, cJSON_Object);
363
364 cJSON_Delete(root);
365}
366
367static void cjson_add_object_should_fail_with_null_pointers(void)
368{

Callers

nothing calls this directly

Calls 4

cJSON_CreateObjectFunction · 0.85
cJSON_AddObjectToObjectFunction · 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…