Lines Matching full:map
20 cbor_item_t *map; variable
26 map = cbor_load(empty_map, 1, &res); in test_empty_map()
27 assert_non_null(map); in test_empty_map()
28 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_empty_map()
29 assert_true(cbor_isa_map(map)); in test_empty_map()
30 assert_true(cbor_map_size(map) == 0); in test_empty_map()
32 assert_size_equal(cbor_map_allocated(map), 0); in test_empty_map()
33 cbor_decref(&map); in test_empty_map()
34 assert_null(map); in test_empty_map()
41 map = cbor_load(simple_map, 5, &res); in test_simple_map()
42 assert_non_null(map); in test_simple_map()
43 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_simple_map()
44 assert_true(cbor_isa_map(map)); in test_simple_map()
45 assert_true(cbor_map_is_definite(map)); in test_simple_map()
46 assert_true(cbor_map_size(map) == 2); in test_simple_map()
48 struct cbor_pair *handle = cbor_map_handle(map); in test_simple_map()
53 cbor_decref(&map); in test_simple_map()
54 assert_null(map); in test_simple_map()
61 map = cbor_load(simple_indef_map, 6, &res); in test_indef_simple_map()
62 assert_non_null(map); in test_indef_simple_map()
63 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_indef_simple_map()
64 assert_true(cbor_isa_map(map)); in test_indef_simple_map()
65 assert_true(cbor_map_is_indefinite(map)); in test_indef_simple_map()
66 assert_true(cbor_map_size(map) == 2); in test_indef_simple_map()
68 struct cbor_pair *handle = cbor_map_handle(map); in test_indef_simple_map()
73 cbor_decref(&map); in test_indef_simple_map()
74 assert_null(map); in test_indef_simple_map()
88 map = cbor_load(def_nested_map, 34, &res); in test_def_nested_map()
89 assert_non_null(map); in test_def_nested_map()
90 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_def_nested_map()
91 assert_true(cbor_isa_map(map)); in test_def_nested_map()
92 assert_true(cbor_map_is_definite(map)); in test_def_nested_map()
93 assert_true(cbor_map_size(map) == 1); in test_def_nested_map()
95 struct cbor_pair *handle = cbor_map_handle(map); in test_def_nested_map()
103 cbor_decref(&map); in test_def_nested_map()
104 assert_null(map); in test_def_nested_map()
112 map = cbor_load(streamed_key_map, 8, &res); in test_streamed_key_map()
113 assert_non_null(map); in test_streamed_key_map()
114 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_streamed_key_map()
115 assert_true(cbor_isa_map(map)); in test_streamed_key_map()
116 assert_true(cbor_map_is_definite(map)); in test_streamed_key_map()
117 assert_true(cbor_map_size(map) == 1); in test_streamed_key_map()
119 struct cbor_pair *handle = cbor_map_handle(map); in test_streamed_key_map()
125 cbor_decref(&map); in test_streamed_key_map()
126 assert_null(map); in test_streamed_key_map()
134 map = cbor_load(streamed_kv_map, 13, &res); in test_streamed_kv_map()
135 assert_non_null(map); in test_streamed_kv_map()
136 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_streamed_kv_map()
137 assert_true(cbor_isa_map(map)); in test_streamed_kv_map()
138 assert_true(cbor_map_is_definite(map)); in test_streamed_kv_map()
139 assert_size_equal(cbor_map_size(map), 1); in test_streamed_kv_map()
141 struct cbor_pair *handle = cbor_map_handle(map); in test_streamed_kv_map()
151 cbor_decref(&map); in test_streamed_kv_map()
152 assert_null(map); in test_streamed_kv_map()
161 map = cbor_load(streamed_streamed_kv_map, 14, &res); in test_streamed_streamed_kv_map()
162 assert_non_null(map); in test_streamed_streamed_kv_map()
163 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_streamed_streamed_kv_map()
164 assert_true(cbor_isa_map(map)); in test_streamed_streamed_kv_map()
165 assert_true(cbor_map_is_indefinite(map)); in test_streamed_streamed_kv_map()
166 assert_size_equal(cbor_map_size(map), 1); in test_streamed_streamed_kv_map()
168 struct cbor_pair *handle = cbor_map_handle(map); in test_streamed_streamed_kv_map()
178 cbor_decref(&map); in test_streamed_streamed_kv_map()
179 assert_null(map); in test_streamed_streamed_kv_map()
183 map = cbor_new_definite_map(0); in test_map_add_full()
187 assert_false(cbor_map_add(map, (struct cbor_pair){.key = one, .value = two})); in test_map_add_full()
189 cbor_decref(&map); in test_map_add_full()
195 map = cbor_new_indefinite_map(); in test_map_add_too_big_to_realloc()
197 (struct _cbor_map_metadata *)&map->metadata; in test_map_add_too_big_to_realloc()
204 assert_false(cbor_map_add(map, (struct cbor_pair){.key = one, .value = two})); in test_map_add_too_big_to_realloc()
208 cbor_decref(&map); in test_map_add_too_big_to_realloc()
224 cbor_item_t *map = cbor_new_indefinite_map(); in test_map_add()
229 cbor_map_add(map, (struct cbor_pair){.key = key, .value = value})); in test_map_add()
230 assert_size_equal(cbor_map_allocated(map), 0); in test_map_add()
231 assert_null(map->data); in test_map_add()
233 cbor_decref(&map); in test_map_add()
244 cbor_item_t *map; in test_indef_map_decode()
246 map = cbor_load(test_indef_map, 6, &res); in test_indef_map_decode()
248 assert_null(map); in test_indef_map_decode()