From 06166eead97df404325334f74c5b1f5239375629 Mon Sep 17 00:00:00 2001 From: kientzle Date: Sat, 6 Dec 2008 05:59:46 +0000 Subject: Better reporting of test failures. --- lib/libarchive/test/test_read_pax_truncated.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib') 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)); -- cgit v1.1