Lines Matching +full:copy +full:- +full:item
2 Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
4 Permission is hereby granted, free of charge, to any person obtaining a copy
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31 static cJSON item[1]; variable
35 TEST_ASSERT_NOT_NULL_MESSAGE(object_item, "Item is NULL."); in assert_is_object()
47 TEST_ASSERT_NOT_NULL_MESSAGE(child_item, "Child item is NULL."); in assert_is_child()
48 TEST_ASSERT_NOT_NULL_MESSAGE(child_item->string, "Child item doesn't have a name."); in assert_is_child()
49 TEST_ASSERT_EQUAL_STRING_MESSAGE(name, child_item->string, "Child item has the wrong name."); in assert_is_child()
50 TEST_ASSERT_BITS(0xFF, type, child_item->type); in assert_is_child()
60 TEST_ASSERT_FALSE(parse_object(item, &parsebuffer)); in assert_not_object()
61 assert_is_invalid(item); in assert_not_object()
62 reset(item); in assert_not_object()
72 TEST_ASSERT_TRUE(parse_object(item, &parsebuffer)); in assert_parse_object()
73 assert_is_object(item); in assert_parse_object()
79 assert_has_no_child(item); in parse_object_should_parse_empty_objects()
80 reset(item); in parse_object_should_parse_empty_objects()
83 assert_has_no_child(item); in parse_object_should_parse_empty_objects()
84 reset(item); in parse_object_should_parse_empty_objects()
91 assert_is_child(item->child, "one", cJSON_Number); in parse_object_should_parse_objects_with_one_element()
92 reset(item); in parse_object_should_parse_objects_with_one_element()
95 assert_is_child(item->child, "hello", cJSON_String); in parse_object_should_parse_objects_with_one_element()
96 reset(item); in parse_object_should_parse_objects_with_one_element()
99 assert_is_child(item->child, "array", cJSON_Array); in parse_object_should_parse_objects_with_one_element()
100 reset(item); in parse_object_should_parse_objects_with_one_element()
103 assert_is_child(item->child, "null", cJSON_NULL); in parse_object_should_parse_objects_with_one_element()
104 reset(item); in parse_object_should_parse_objects_with_one_element()
110 assert_is_child(item->child, "one", cJSON_Number); in parse_object_should_parse_objects_with_multiple_elements()
111 assert_is_child(item->child->next, "two", cJSON_Number); in parse_object_should_parse_objects_with_multiple_elements()
112 assert_is_child(item->child->next->next, "three", cJSON_Number); in parse_object_should_parse_objects_with_multiple_elements()
113 reset(item); in parse_object_should_parse_objects_with_multiple_elements()
140 node = item->child; in parse_object_should_parse_objects_with_multiple_elements()
145 (void)i++, node = node->next) in parse_object_should_parse_objects_with_multiple_elements()
150 reset(item); in parse_object_should_parse_objects_with_multiple_elements()
167 /* initialize cJSON item */ in main()
168 memset(item, 0, sizeof(cJSON)); in main()