Exemplo n.º 1
0
int
main(void)
{
    test_equal();

    test_overflow();

    lzma_index *i = create_empty();
    test_many(i);
    lzma_index_end(i, NULL);

    i = create_small();
    test_many(i);
    lzma_index_end(i, NULL);

    i = create_big();
    test_many(i);
    lzma_index_end(i, NULL);

    test_cat();

    test_locate();

    test_corrupt();

    return 0;
}
Exemplo n.º 2
0
int main(int argc, char **argv) {
  grpc_test_init(argc, argv);
  test_full();
  test_empty();
  test_trace_only();
  test_span_only();
  test_encode_decode();
  test_corrupt();
  test_no_span_options();
  test_buffer_size();

  return 0;
}
int
main(void)
{
	test_equal();

	test_overflow();

	lzma_index *i = create_empty();
	test_many(i);
	lzma_index_end(i, NULL);

	i = create_small();
	test_many(i);
	lzma_index_end(i, NULL);

	i = create_big();
	test_many(i);
	lzma_index_end(i, NULL);

	test_cat();

	test_locate();

	test_corrupt();

	// Test for the bug fix 21515d79d778b8730a434f151b07202d52a04611:
	// liblzma: Fix lzma_index_dup() for empty Streams.
	i = create_empty();
	expect(lzma_index_stream_padding(i, 4) == LZMA_OK);
	test_copy(i);
	lzma_index_end(i, NULL);

	// Test for the bug fix 3bf857edfef51374f6f3fffae3d817f57d3264a0:
	// liblzma: Fix a memory leak in error path of lzma_index_dup().
	// Use Valgrind to see that there are no leaks.
	i = create_small();
	expect(lzma_index_dup(i, &my_allocator) == NULL);
	lzma_index_end(i, NULL);

	return 0;
}