• Home
  • Raw
  • Download

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(array_item, "Item is NULL."); in assert_is_array()
52 TEST_ASSERT_FALSE(parse_array(item, &buffer)); in assert_not_array()
53 assert_is_invalid(item); in assert_not_array()
63 TEST_ASSERT_TRUE(parse_array(item, &buffer)); in assert_parse_array()
64 assert_is_array(item); in assert_parse_array()
70 assert_has_no_child(item); in parse_array_should_parse_empty_arrays()
73 assert_has_no_child(item); in parse_array_should_parse_empty_arrays()
81 assert_has_child(item); in parse_array_should_parse_arrays_with_one_element()
82 assert_has_type(item->child, cJSON_Number); in parse_array_should_parse_arrays_with_one_element()
83 reset(item); in parse_array_should_parse_arrays_with_one_element()
86 assert_has_child(item); in parse_array_should_parse_arrays_with_one_element()
87 assert_has_type(item->child, cJSON_String); in parse_array_should_parse_arrays_with_one_element()
88 TEST_ASSERT_EQUAL_STRING("hello!", item->child->valuestring); in parse_array_should_parse_arrays_with_one_element()
89 reset(item); in parse_array_should_parse_arrays_with_one_element()
92 assert_has_child(item); in parse_array_should_parse_arrays_with_one_element()
93 TEST_ASSERT_NOT_NULL(item->child); in parse_array_should_parse_arrays_with_one_element()
94 assert_has_type(item->child, cJSON_Array); in parse_array_should_parse_arrays_with_one_element()
95 assert_has_no_child(item->child); in parse_array_should_parse_arrays_with_one_element()
96 reset(item); in parse_array_should_parse_arrays_with_one_element()
99 assert_has_child(item); in parse_array_should_parse_arrays_with_one_element()
100 assert_has_type(item->child, cJSON_NULL); in parse_array_should_parse_arrays_with_one_element()
101 reset(item); in parse_array_should_parse_arrays_with_one_element()
107 assert_has_child(item); in parse_array_should_parse_arrays_with_multiple_elements()
108 TEST_ASSERT_NOT_NULL(item->child->next); in parse_array_should_parse_arrays_with_multiple_elements()
109 TEST_ASSERT_NOT_NULL(item->child->next->next); in parse_array_should_parse_arrays_with_multiple_elements()
110 TEST_ASSERT_NULL(item->child->next->next->next); in parse_array_should_parse_arrays_with_multiple_elements()
111 assert_has_type(item->child, cJSON_Number); in parse_array_should_parse_arrays_with_multiple_elements()
112 assert_has_type(item->child->next, cJSON_Number); in parse_array_should_parse_arrays_with_multiple_elements()
113 assert_has_type(item->child->next->next, cJSON_Number); in parse_array_should_parse_arrays_with_multiple_elements()
114 reset(item); in parse_array_should_parse_arrays_with_multiple_elements()
131 node = item->child; in parse_array_should_parse_arrays_with_multiple_elements()
136 (void)i++, node = node->next) in parse_array_should_parse_arrays_with_multiple_elements()
138 TEST_ASSERT_BITS(0xFF, expected_types[i], node->type); in parse_array_should_parse_arrays_with_multiple_elements()
141 reset(item); in parse_array_should_parse_arrays_with_multiple_elements()
158 /* initialize cJSON item */ in main()
159 memset(item, 0, sizeof(cJSON)); in main()