Lines Matching full:root
50 cJSON *root = cJSON_CreateObject(); in cjson_add_null_should_add_null() local
53 cJSON_AddNullToObject(root, "null"); in cjson_add_null_should_add_null()
55 TEST_ASSERT_NOT_NULL(null = cJSON_GetObjectItemCaseSensitive(root, "null")); in cjson_add_null_should_add_null()
58 cJSON_Delete(root); in cjson_add_null_should_add_null()
63 cJSON *root = cJSON_CreateObject(); in cjson_add_null_should_fail_with_null_pointers() local
66 TEST_ASSERT_NULL(cJSON_AddNullToObject(root, NULL)); in cjson_add_null_should_fail_with_null_pointers()
68 cJSON_Delete(root); in cjson_add_null_should_fail_with_null_pointers()
73 cJSON *root = cJSON_CreateObject(); in cjson_add_null_should_fail_on_allocation_failure() local
77 TEST_ASSERT_NULL(cJSON_AddNullToObject(root, "null")); in cjson_add_null_should_fail_on_allocation_failure()
81 cJSON_Delete(root); in cjson_add_null_should_fail_on_allocation_failure()
86 cJSON *root = cJSON_CreateObject(); in cjson_add_true_should_add_true() local
89 cJSON_AddTrueToObject(root, "true"); in cjson_add_true_should_add_true()
91 TEST_ASSERT_NOT_NULL(true_item = cJSON_GetObjectItemCaseSensitive(root, "true")); in cjson_add_true_should_add_true()
94 cJSON_Delete(root); in cjson_add_true_should_add_true()
99 cJSON *root = cJSON_CreateObject(); in cjson_add_true_should_fail_with_null_pointers() local
102 TEST_ASSERT_NULL(cJSON_AddTrueToObject(root, NULL)); in cjson_add_true_should_fail_with_null_pointers()
104 cJSON_Delete(root); in cjson_add_true_should_fail_with_null_pointers()
109 cJSON *root = cJSON_CreateObject(); in cjson_add_true_should_fail_on_allocation_failure() local
113 TEST_ASSERT_NULL(cJSON_AddTrueToObject(root, "true")); in cjson_add_true_should_fail_on_allocation_failure()
117 cJSON_Delete(root); in cjson_add_true_should_fail_on_allocation_failure()
166 cJSON *root = cJSON_CreateObject(); in cjson_add_false_should_add_false() local
169 cJSON_AddFalseToObject(root, "false"); in cjson_add_false_should_add_false()
171 TEST_ASSERT_NOT_NULL(false_item = cJSON_GetObjectItemCaseSensitive(root, "false")); in cjson_add_false_should_add_false()
174 cJSON_Delete(root); in cjson_add_false_should_add_false()
179 cJSON *root = cJSON_CreateObject(); in cjson_add_false_should_fail_with_null_pointers() local
182 TEST_ASSERT_NULL(cJSON_AddFalseToObject(root, NULL)); in cjson_add_false_should_fail_with_null_pointers()
184 cJSON_Delete(root); in cjson_add_false_should_fail_with_null_pointers()
189 cJSON *root = cJSON_CreateObject(); in cjson_add_false_should_fail_on_allocation_failure() local
193 TEST_ASSERT_NULL(cJSON_AddFalseToObject(root, "false")); in cjson_add_false_should_fail_on_allocation_failure()
197 cJSON_Delete(root); in cjson_add_false_should_fail_on_allocation_failure()
202 cJSON *root = cJSON_CreateObject(); in cjson_add_bool_should_add_bool() local
207 cJSON_AddBoolToObject(root, "true", true); in cjson_add_bool_should_add_bool()
208 TEST_ASSERT_NOT_NULL(true_item = cJSON_GetObjectItemCaseSensitive(root, "true")); in cjson_add_bool_should_add_bool()
212 cJSON_AddBoolToObject(root, "false", false); in cjson_add_bool_should_add_bool()
213 TEST_ASSERT_NOT_NULL(false_item = cJSON_GetObjectItemCaseSensitive(root, "false")); in cjson_add_bool_should_add_bool()
216 cJSON_Delete(root); in cjson_add_bool_should_add_bool()
221 cJSON *root = cJSON_CreateObject(); in cjson_add_bool_should_fail_with_null_pointers() local
224 TEST_ASSERT_NULL(cJSON_AddBoolToObject(root, NULL, false)); in cjson_add_bool_should_fail_with_null_pointers()
226 cJSON_Delete(root); in cjson_add_bool_should_fail_with_null_pointers()
231 cJSON *root = cJSON_CreateObject(); in cjson_add_bool_should_fail_on_allocation_failure() local
235 TEST_ASSERT_NULL(cJSON_AddBoolToObject(root, "false", false)); in cjson_add_bool_should_fail_on_allocation_failure()
239 cJSON_Delete(root); in cjson_add_bool_should_fail_on_allocation_failure()
244 cJSON *root = cJSON_CreateObject(); in cjson_add_number_should_add_number() local
247 cJSON_AddNumberToObject(root, "number", 42); in cjson_add_number_should_add_number()
249 TEST_ASSERT_NOT_NULL(number = cJSON_GetObjectItemCaseSensitive(root, "number")); in cjson_add_number_should_add_number()
255 cJSON_Delete(root); in cjson_add_number_should_add_number()
260 cJSON *root = cJSON_CreateObject(); in cjson_add_number_should_fail_with_null_pointers() local
263 TEST_ASSERT_NULL(cJSON_AddNumberToObject(root, NULL, 42)); in cjson_add_number_should_fail_with_null_pointers()
265 cJSON_Delete(root); in cjson_add_number_should_fail_with_null_pointers()
270 cJSON *root = cJSON_CreateObject(); in cjson_add_number_should_fail_on_allocation_failure() local
274 TEST_ASSERT_NULL(cJSON_AddNumberToObject(root, "number", 42)); in cjson_add_number_should_fail_on_allocation_failure()
278 cJSON_Delete(root); in cjson_add_number_should_fail_on_allocation_failure()
283 cJSON *root = cJSON_CreateObject(); in cjson_add_string_should_add_string() local
286 cJSON_AddStringToObject(root, "string", "Hello World!"); in cjson_add_string_should_add_string()
288 TEST_ASSERT_NOT_NULL(string = cJSON_GetObjectItemCaseSensitive(root, "string")); in cjson_add_string_should_add_string()
292 cJSON_Delete(root); in cjson_add_string_should_add_string()
297 cJSON *root = cJSON_CreateObject(); in cjson_add_string_should_fail_with_null_pointers() local
300 TEST_ASSERT_NULL(cJSON_AddStringToObject(root, NULL, "string")); in cjson_add_string_should_fail_with_null_pointers()
302 cJSON_Delete(root); in cjson_add_string_should_fail_with_null_pointers()
307 cJSON *root = cJSON_CreateObject(); in cjson_add_string_should_fail_on_allocation_failure() local
311 TEST_ASSERT_NULL(cJSON_AddStringToObject(root, "string", "string")); in cjson_add_string_should_fail_on_allocation_failure()
315 cJSON_Delete(root); in cjson_add_string_should_fail_on_allocation_failure()
320 cJSON *root = cJSON_CreateObject(); in cjson_add_raw_should_add_raw() local
323 cJSON_AddRawToObject(root, "raw", "{}"); in cjson_add_raw_should_add_raw()
325 TEST_ASSERT_NOT_NULL(raw = cJSON_GetObjectItemCaseSensitive(root, "raw")); in cjson_add_raw_should_add_raw()
329 cJSON_Delete(root); in cjson_add_raw_should_add_raw()
334 cJSON *root = cJSON_CreateObject(); in cjson_add_raw_should_fail_with_null_pointers() local
337 TEST_ASSERT_NULL(cJSON_AddRawToObject(root, NULL, "{}")); in cjson_add_raw_should_fail_with_null_pointers()
339 cJSON_Delete(root); in cjson_add_raw_should_fail_with_null_pointers()
344 cJSON *root = cJSON_CreateObject(); in cjson_add_raw_should_fail_on_allocation_failure() local
348 TEST_ASSERT_NULL(cJSON_AddRawToObject(root, "raw", "{}")); in cjson_add_raw_should_fail_on_allocation_failure()
352 cJSON_Delete(root); in cjson_add_raw_should_fail_on_allocation_failure()
357 cJSON *root = cJSON_CreateObject(); in cJSON_add_object_should_add_object() local
360 cJSON_AddObjectToObject(root, "object"); in cJSON_add_object_should_add_object()
361 TEST_ASSERT_NOT_NULL(object = cJSON_GetObjectItemCaseSensitive(root, "object")); in cJSON_add_object_should_add_object()
364 cJSON_Delete(root); in cJSON_add_object_should_add_object()
369 cJSON *root = cJSON_CreateObject(); in cjson_add_object_should_fail_with_null_pointers() local
372 TEST_ASSERT_NULL(cJSON_AddObjectToObject(root, NULL)); in cjson_add_object_should_fail_with_null_pointers()
374 cJSON_Delete(root); in cjson_add_object_should_fail_with_null_pointers()
379 cJSON *root = cJSON_CreateObject(); in cjson_add_object_should_fail_on_allocation_failure() local
383 TEST_ASSERT_NULL(cJSON_AddObjectToObject(root, "object")); in cjson_add_object_should_fail_on_allocation_failure()
387 cJSON_Delete(root); in cjson_add_object_should_fail_on_allocation_failure()
392 cJSON *root = cJSON_CreateObject(); in cJSON_add_array_should_add_array() local
395 cJSON_AddArrayToObject(root, "array"); in cJSON_add_array_should_add_array()
396 TEST_ASSERT_NOT_NULL(array = cJSON_GetObjectItemCaseSensitive(root, "array")); in cJSON_add_array_should_add_array()
399 cJSON_Delete(root); in cJSON_add_array_should_add_array()
404 cJSON *root = cJSON_CreateObject(); in cjson_add_array_should_fail_with_null_pointers() local
407 TEST_ASSERT_NULL(cJSON_AddArrayToObject(root, NULL)); in cjson_add_array_should_fail_with_null_pointers()
409 cJSON_Delete(root); in cjson_add_array_should_fail_with_null_pointers()
414 cJSON *root = cJSON_CreateObject(); in cjson_add_array_should_fail_on_allocation_failure() local
418 TEST_ASSERT_NULL(cJSON_AddArrayToObject(root, "array")); in cjson_add_array_should_fail_on_allocation_failure()
422 cJSON_Delete(root); in cjson_add_array_should_fail_on_allocation_failure()