Lines Matching refs:expect
25 expect(i != NULL);
34 expect(i != NULL);
35 expect(lzma_index_append(i, NULL, 101, 555) == LZMA_OK);
36 expect(lzma_index_append(i, NULL, 602, 777) == LZMA_OK);
37 expect(lzma_index_append(i, NULL, 804, 999) == LZMA_OK);
46 expect(i != NULL);
56 expect(lzma_index_append(i, NULL, t, n) == LZMA_OK);
61 expect(lzma_index_block_count(i) == BIG_COUNT);
62 expect(lzma_index_total_size(i) == total_size);
63 expect(lzma_index_uncompressed_size(i) == uncompressed_size);
64 expect(lzma_index_total_size(i) + lzma_index_size(i)
132 expect(a && b && c);
134 expect(is_equal(a, a));
135 expect(is_equal(b, b));
136 expect(is_equal(c, c));
138 expect(!is_equal(a, b));
139 expect(!is_equal(a, c));
140 expect(!is_equal(b, c));
154 expect(lzma_index_append(i, NULL, LZMA_VLI_MAX - 5, 1234)
167 expect(d != NULL);
168 expect(is_equal(i, d));
193 expect(r.block.compressed_file_offset
195 expect(r.block.uncompressed_file_offset
202 expect(lzma_index_total_size(i) == total_size);
203 expect(lzma_index_uncompressed_size(i) == uncompressed_size);
204 expect(lzma_index_block_count(i) == count);
216 expect(buf != NULL);
220 expect(lzma_index_encoder(&strm, i) == LZMA_OK);
227 expect(lzma_index_decoder(&strm, &d, MEMLIMIT) == LZMA_OK);
228 expect(d == NULL);
231 expect(is_equal(i, d));
238 expect(h != NULL);
242 expect(lzma_index_hash_append(h, r.block.unpadded_size,
246 expect(lzma_index_hash_decode(h, buf, &pos, pos + 1)
248 expect(lzma_index_hash_decode(h, buf, &pos, pos + 1)
255 expect(lzma_index_buffer_encode(i, buf, &buf_pos, index_size)
257 expect(buf_pos == 1);
260 expect(buf_pos == index_size + 1);
265 expect(lzma_index_buffer_decode(&d, &memlimit, NULL, buf, &buf_pos,
267 expect(buf_pos == 1);
268 expect(d == NULL);
272 expect(buf_pos == index_size + 1);
273 expect(is_equal(i, d));
299 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
300 expect(lzma_index_block_count(a) == 0);
301 expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
302 expect(lzma_index_file_size(a)
305 expect(lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
308 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
309 expect(lzma_index_block_count(a) == 0);
310 expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
311 expect(lzma_index_file_size(a)
316 expect(lzma_index_stream_padding(b, 4) == LZMA_OK);
317 expect(lzma_index_cat(b, c, NULL) == LZMA_OK);
318 expect(lzma_index_block_count(b) == 0);
319 expect(lzma_index_stream_size(b) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
320 expect(lzma_index_file_size(b)
323 expect(lzma_index_stream_padding(a, 8) == LZMA_OK);
324 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
325 expect(lzma_index_block_count(a) == 0);
326 expect(lzma_index_stream_size(a) == 2 * LZMA_STREAM_HEADER_SIZE + 8);
327 expect(lzma_index_file_size(a)
330 expect(lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
332 expect(lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
340 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
344 expect(lzma_index_stream_padding(a, 4) == LZMA_OK);
345 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
346 expect(lzma_index_file_size(a) == stream_size * 2 + 4);
347 expect(lzma_index_stream_size(a) > stream_size);
348 expect(lzma_index_stream_size(a) < stream_size * 2);
350 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
355 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
360 expect(lzma_index_stream_padding(b, 8) == LZMA_OK);
361 expect(lzma_index_cat(b, c, NULL) == LZMA_OK);
362 expect(lzma_index_stream_padding(a, 12) == LZMA_OK);
363 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
364 expect(lzma_index_file_size(a) == stream_size * 4 + 4 + 8 + 12);
366 expect(lzma_index_block_count(a) == SMALL_COUNT * 4);
368 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
373 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
381 expect(lzma_index_stream_padding(a, 4) == LZMA_OK);
382 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
385 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
394 expect(lzma_index_stream_padding(a, 4) == LZMA_OK);
395 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
396 expect(lzma_index_file_size(a) == stream_size * 2 + 4);
397 expect(lzma_index_stream_size(a) > stream_size);
398 expect(lzma_index_stream_size(a) < stream_size * 2);
402 expect(lzma_index_stream_padding(b, 8) == LZMA_OK);
403 expect(lzma_index_cat(b, c, NULL) == LZMA_OK);
404 expect(lzma_index_stream_padding(a, 12) == LZMA_OK);
405 expect(lzma_index_cat(a, b, NULL) == LZMA_OK);
406 expect(lzma_index_file_size(a) == stream_size * 4 + 4 + 8 + 12);
410 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK)
421 expect(i != NULL);
426 expect(lzma_index_iter_locate(&r, 0));
427 expect(lzma_index_iter_locate(&r, 555));
431 expect(lzma_index_append(i, NULL, 16, 0) == LZMA_OK);
432 expect(lzma_index_iter_locate(&r, 0));
435 expect(lzma_index_append(i, NULL, 32, 5) == LZMA_OK);
436 expect(!lzma_index_iter_locate(&r, 0));
437 expect(r.block.total_size == 32);
438 expect(r.block.uncompressed_size == 5);
439 expect(r.block.compressed_file_offset
441 expect(r.block.uncompressed_file_offset == 0);
444 expect(lzma_index_iter_locate(&r, 5));
447 expect(lzma_index_append(i, NULL, 40, 11) == LZMA_OK);
449 expect(!lzma_index_iter_locate(&r, 0));
450 expect(r.block.total_size == 32);
451 expect(r.block.uncompressed_size == 5);
452 expect(r.block.compressed_file_offset
454 expect(r.block.uncompressed_file_offset == 0);
456 expect(!lzma_index_iter_next(&r, LZMA_INDEX_ITER_BLOCK));
457 expect(r.block.total_size == 40);
458 expect(r.block.uncompressed_size == 11);
459 expect(r.block.compressed_file_offset
461 expect(r.block.uncompressed_file_offset == 5);
463 expect(!lzma_index_iter_locate(&r, 2));
464 expect(r.block.total_size == 32);
465 expect(r.block.uncompressed_size == 5);
466 expect(r.block.compressed_file_offset
468 expect(r.block.uncompressed_file_offset == 0);
470 expect(!lzma_index_iter_locate(&r, 5));
471 expect(r.block.total_size == 40);
472 expect(r.block.uncompressed_size == 11);
473 expect(r.block.compressed_file_offset
475 expect(r.block.uncompressed_file_offset == 5);
477 expect(!lzma_index_iter_locate(&r, 5 + 11 - 1));
478 expect(r.block.total_size == 40);
479 expect(r.block.uncompressed_size == 11);
480 expect(r.block.compressed_file_offset
482 expect(r.block.uncompressed_file_offset == 5);
484 expect(lzma_index_iter_locate(&r, 5 + 11));
485 expect(lzma_index_iter_locate(&r, 5 + 15));
490 expect(i != NULL);
494 expect(lzma_index_append(i, NULL, n + 8, n) == LZMA_OK);
496 expect(lzma_index_block_count(i) == 5555);
499 expect(!lzma_index_iter_locate(&r, 0));
500 expect(r.block.total_size == 4 + 8);
501 expect(r.block.uncompressed_size == 4);
502 expect(r.block.compressed_file_offset == LZMA_STREAM_HEADER_SIZE);
503 expect(r.block.uncompressed_file_offset == 0);
505 expect(!lzma_index_iter_locate(&r, 3));
506 expect(r.block.total_size == 4 + 8);
507 expect(r.block.uncompressed_size == 4);
508 expect(r.block.compressed_file_offset == LZMA_STREAM_HEADER_SIZE);
509 expect(r.block.uncompressed_file_offset == 0);
512 expect(!lzma_index_iter_locate(&r, 4));
513 expect(r.block.total_size == 2 * 4 + 8);
514 expect(r.block.uncompressed_size == 2 * 4);
515 expect(r.block.compressed_file_offset
517 expect(r.block.uncompressed_file_offset == 4);
520 expect(!lzma_index_iter_locate(
522 expect(r.block.total_size == 4 * 5555 + 8);
523 expect(r.block.uncompressed_size == 4 * 5555);
524 expect(r.block.compressed_file_offset == lzma_index_total_size(i)
526 expect(r.block.uncompressed_file_offset
543 expect(!lzma_index_iter_locate(&r, ubase + n * 4));
545 expect(r.block.compressed_file_offset == tbase + n * 4 + 8
547 expect(r.block.uncompressed_file_offset == ubase + n * 4);
553 expect(r.block.total_size == n * 4 + 8);
554 expect(r.block.uncompressed_size == n * 4);
559 expect(!lzma_index_iter_locate(&r, ubase + (n - 1) * 4));
561 expect(r.block.total_size == n * 4 + 8);
562 expect(r.block.uncompressed_size == n * 4);
568 expect(r.block.compressed_file_offset == tbase + n * 4 + 8
570 expect(r.block.uncompressed_file_offset == ubase + n * 4);
576 expect(i != NULL);
579 expect(lzma_index_append(i, NULL, 8, 0) == LZMA_OK);
580 expect(lzma_index_append(i, NULL, 16, 1) == LZMA_OK);
581 expect(!lzma_index_iter_locate(&r, 0));
582 expect(r.block.total_size == 16);
583 expect(r.block.uncompressed_size == 1);
584 expect(r.block.compressed_file_offset
586 expect(r.block.uncompressed_file_offset == 0);
597 expect(buf != NULL);
601 expect(lzma_index_append(i, NULL, 0, 1) == LZMA_PROG_ERROR);
606 expect(lzma_index_encoder(&strm, i) == LZMA_OK);
613 expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
619 expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);
625 expect(lzma_index_decoder(&strm, &i, MEMLIMIT) == LZMA_OK);