Lines Matching full:array

117   cbor_item_t *array = cbor_new_definite_array(2);  in test_array_replace()  local
118 assert_size_equal(cbor_array_size(array), 0); in test_array_replace()
125 assert_false(cbor_array_replace(array, 0, three)); in test_array_replace()
129 assert_true(cbor_array_push(array, one)); in test_array_replace()
130 assert_true(cbor_array_push(array, cbor_move(cbor_build_uint8(2)))); in test_array_replace()
132 assert_size_equal(cbor_array_size(array), 2); in test_array_replace()
134 // Array has only two items in test_array_replace()
135 assert_false(cbor_array_replace(array, 2, three)); in test_array_replace()
139 assert_true(cbor_array_replace(array, 0, three)); in test_array_replace()
142 assert_uint8(cbor_move(cbor_array_get(array, 0)), 3); in test_array_replace()
143 assert_uint8(cbor_move(cbor_array_get(array, 1)), 2); in test_array_replace()
147 cbor_decref(&array); in test_array_replace()
151 cbor_item_t *array = cbor_new_indefinite_array(); in test_array_push_overflow() local
154 (struct _cbor_array_metadata *)&array->metadata; in test_array_push_overflow()
159 assert_false(cbor_array_push(array, one)); in test_array_push_overflow()
165 cbor_decref(&array); in test_array_push_overflow()
179 cbor_item_t *array = cbor_new_indefinite_array(); in test_array_push()
182 assert_false(cbor_array_push(array, string)); in test_array_push()
183 assert_size_equal(cbor_array_allocated(array), 0); in test_array_push()
184 assert_null(array->data); in test_array_push()
185 assert_size_equal(array->metadata.array_metadata.end_ptr, 0); in test_array_push()
188 cbor_decref(&array); in test_array_push()
197 cbor_item_t *array; in test_indef_array_decode()
199 array = cbor_load(simple_indef_array, 4, &res); in test_indef_array_decode()
201 assert_null(array); in test_indef_array_decode()