Lines Matching refs:blob
125 struct blob blob; in test_write_and_read_functions() local
131 blob_init(&blob); in test_write_and_read_functions()
135 blob_write_bytes(&blob, bytes_test_str, sizeof(bytes_test_str)); in test_write_and_read_functions()
137 reserved = blob_reserve_bytes(&blob, sizeof(reserve_test_str)); in test_write_and_read_functions()
138 blob_overwrite_bytes(&blob, reserved, reserve_test_str, sizeof(reserve_test_str)); in test_write_and_read_functions()
141 str_offset = blob.size; in test_write_and_read_functions()
142 blob_write_bytes(&blob, placeholder_str, sizeof(placeholder_str)); in test_write_and_read_functions()
144 blob_write_uint32(&blob, uint32_test); in test_write_and_read_functions()
147 uint_offset = blob.size; in test_write_and_read_functions()
148 blob_write_uint32(&blob, uint32_placeholder); in test_write_and_read_functions()
150 blob_write_uint64(&blob, uint64_test); in test_write_and_read_functions()
152 blob_write_intptr(&blob, (intptr_t) &blob); in test_write_and_read_functions()
154 blob_write_string(&blob, string_test_str); in test_write_and_read_functions()
157 blob_overwrite_bytes(&blob, str_offset, overwrite_test_str, in test_write_and_read_functions()
159 blob_overwrite_uint32(&blob, uint_offset, uint32_overwrite); in test_write_and_read_functions()
162 blob_reader_init(&reader, blob.data, blob.size); in test_write_and_read_functions()
182 expect_equal((intptr_t) &blob, blob_read_intptr(&reader), in test_write_and_read_functions()
191 blob_finish(&blob); in test_write_and_read_functions()
198 struct blob blob; in test_alignment() local
203 blob_init(&blob); in test_alignment()
209 blob_write_intptr(&blob, (intptr_t) &blob); in test_alignment()
211 delta = blob.size; in test_alignment()
212 last = blob.size; in test_alignment()
222 blob_write_bytes(&blob, bytes, num_bytes); in test_alignment()
224 expect_unequal(delta, blob.size - last, "unaligned write of bytes"); in test_alignment()
226 blob_write_intptr(&blob, (intptr_t) &blob); in test_alignment()
228 expect_equal(2 * delta, blob.size - last, "aligned write of intptr"); in test_alignment()
230 last = blob.size; in test_alignment()
237 blob_reader_init(&reader, blob.data, blob.size); in test_alignment()
239 expect_equal((intptr_t) &blob, blob_read_intptr(&reader), in test_alignment()
245 expect_equal((intptr_t) &blob, blob_read_intptr(&reader), in test_alignment()
249 blob_finish(&blob); in test_alignment()
256 struct blob blob; in test_overrun() local
260 blob_init(&blob); in test_overrun()
262 blob_write_uint32(&blob, value); in test_overrun()
264 blob_reader_init(&reader, blob.data, blob.size); in test_overrun()
271 blob_finish(&blob); in test_overrun()
281 struct blob blob; in test_big_objects() local
288 blob_init(&blob); in test_big_objects()
298 blob_write_bytes(&blob, buf, size); in test_big_objects()
301 blob_reader_init(&reader, blob.data, blob.size); in test_big_objects()
315 blob_finish(&blob); in test_big_objects()