Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2008 05:59:46 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185669 - head/lib/libarchive/test
Message-ID:  <200812060559.mB65xkPc084520@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Sat Dec  6 05:59:46 2008
New Revision: 185669
URL: http://svn.freebsd.org/changeset/base/185669

Log:
  Better reporting of test failures.

Modified:
  head/lib/libarchive/test/test_read_pax_truncated.c

Modified: head/lib/libarchive/test/test_read_pax_truncated.c
==============================================================================
--- head/lib/libarchive/test/test_read_pax_truncated.c	Sat Dec  6 05:58:24 2008	(r185668)
+++ head/lib/libarchive/test/test_read_pax_truncated.c	Sat Dec  6 05:59:46 2008	(r185669)
@@ -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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812060559.mB65xkPc084520>