]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Reorganize test code a bit 1657/head
authorTim Kientzle <kientzle@acm.org>
Wed, 2 Feb 2022 03:33:41 +0000 (19:33 -0800)
committerTim Kientzle <kientzle@acm.org>
Wed, 2 Feb 2022 03:33:41 +0000 (19:33 -0800)
commite93b6c3009982d951dbb27c8dc0d02069273a56a
treee9409dbb8dc4ae8b7f08a9077fed77e6c79b19e6
parent3665c7587d6561f0209da1716f86fbebb9a26778
Reorganize test code a bit

A few guiding principles:
* Each test source file includes ONLY "test.h" to make it easy
  to create new tests.
* Each test suite has a "test.h" that includes "test_util/test_common.h"
  to get access to all the common testing utility functions.

So "test_common.h" is then responsible for including
any smaller headers that declare specific pieces of
shared test functionality.

I've also pulled some test filtering logic that was _only_ used
in test_main.c into that file, and repurposed "test_utils.[ch]"
for common utility code.  (Eventually, a lot of the assertion
helpers currently in "test_main.c" should probably be organized
into one or more source files of their own.)
libarchive/test/test_read_data_large.c
libarchive/test/test_read_extract.c
libarchive/test/test_read_large.c
libarchive/test/test_read_pax_truncated.c
libarchive/test/test_read_truncated.c
libarchive/test/test_read_truncated_filter.c
libarchive/test/test_write_format_7zip_large.c
test_utils/test_common.h
test_utils/test_main.c
test_utils/test_utils.c
test_utils/test_utils.h