diff options
author | kientzle <kientzle@FreeBSD.org> | 2008-12-06 05:59:46 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2008-12-06 05:59:46 +0000 |
commit | 06166eead97df404325334f74c5b1f5239375629 (patch) | |
tree | eb034c4467035fe57f15e8c171337aa834157601 /lib | |
parent | c9d6a73af2bd7c908a5a20ff1bd3f181eff0e689 (diff) | |
download | FreeBSD-src-06166eead97df404325334f74c5b1f5239375629.zip FreeBSD-src-06166eead97df404325334f74c5b1f5239375629.tar.gz |
Better reporting of test failures.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/test/test_read_pax_truncated.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/libarchive/test/test_read_pax_truncated.c b/lib/libarchive/test/test_read_pax_truncated.c index f102dddf..b30e1d1 100644 --- a/lib/libarchive/test/test_read_pax_truncated.c +++ b/lib/libarchive/test/test_read_pax_truncated.c @@ -98,9 +98,13 @@ DEFINE_TEST(test_read_pax_truncated) * does not return an error if it can't consume * it.) */ if (i < 1536 + 512*((filedata_size + 511)/512) + 512) { - assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae)); + failure("i=%d minsize=%d", i, + 1536 + 512*((filedata_size + 511)/512) + 512); + assertEqualIntA(a, ARCHIVE_FATAL, + archive_read_next_header(a, &ae)); } else { - assertA(ARCHIVE_EOF == archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_EOF, + archive_read_next_header(a, &ae)); } wrap_up: assert(0 == archive_read_close(a)); @@ -141,9 +145,11 @@ DEFINE_TEST(test_read_pax_truncated) * does not return an error if it can't consume * it.) */ if (i < 1536 + 512*((filedata_size + 511)/512) + 512) { - assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_FATAL, + archive_read_next_header(a, &ae)); } else { - assertA(ARCHIVE_EOF == archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_EOF, + archive_read_next_header(a, &ae)); } wrap_up2: assert(0 == archive_read_close(a)); |