summaryrefslogtreecommitdiff
path: root/libarchive/test/test_read_large.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2008-09-01 10:38:22 -0400
committerTim Kientzle <kientzle@gmail.com>2008-09-01 10:38:22 -0400
commitf5eb945d50b1d12fafd336baed933be71afd247b (patch)
tree57a08fde6b7f1fc1b6f73240450513993b35f058 /libarchive/test/test_read_large.c
parentd2322d460982fd7a7fdae236128e90629fc362e2 (diff)
downloadlibarchive-f5eb945d50b1d12fafd336baed933be71afd247b.tar.gz
IFC
SVN-Revision: 193
Diffstat (limited to 'libarchive/test/test_read_large.c')
-rw-r--r--libarchive/test/test_read_large.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libarchive/test/test_read_large.c b/libarchive/test/test_read_large.c
index d0342407..4e9a8518 100644
--- a/libarchive/test/test_read_large.c
+++ b/libarchive/test/test_read_large.c
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_large.c,v 1.3 2007/05/29 01:00:21 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_large.c,v 1.4 2008/09/01 05:38:33 kientzle Exp $");
static unsigned char testdata[10 * 1024 * 1024];
static unsigned char testdatacopy[10 * 1024 * 1024];
@@ -52,10 +52,10 @@ DEFINE_TEST(test_read_large)
assertA(0 == archive_write_header(a, entry));
archive_entry_free(entry);
assertA(sizeof(testdata) == archive_write_data(a, testdata, sizeof(testdata)));
-#if ARCHIVE_API_VERSION > 1
- assertA(0 == archive_write_finish(a));
-#else
+#if ARCHIVE_VERSION_NUMBER < 2000000
archive_write_finish(a);
+#else
+ assertA(0 == archive_write_finish(a));
#endif
assert(NULL != (a = archive_read_new()));
@@ -64,10 +64,10 @@ DEFINE_TEST(test_read_large)
assertA(0 == archive_read_open_memory(a, buff, sizeof(buff)));
assertA(0 == archive_read_next_header(a, &entry));
assertA(0 == archive_read_data_into_buffer(a, testdatacopy, sizeof(testdatacopy)));
-#if ARCHIVE_API_VERSION > 1
- assertA(0 == archive_read_finish(a));
-#else
+#if ARCHIVE_VERSION_NUMBER < 2000000
archive_read_finish(a);
+#else
+ assertA(0 == archive_read_finish(a));
#endif
assert(0 == memcmp(testdata, testdatacopy, sizeof(testdata)));
@@ -80,10 +80,10 @@ DEFINE_TEST(test_read_large)
assert(0 < (tmpfilefd = mkstemp(tmpfilename)));
assertA(0 == archive_read_data_into_fd(a, tmpfilefd));
close(tmpfilefd);
-#if ARCHIVE_API_VERSION > 1
- assertA(0 == archive_read_finish(a));
-#else
+#if ARCHIVE_VERSION_NUMBER < 2000000
archive_read_finish(a);
+#else
+ assertA(0 == archive_read_finish(a));
#endif
tmpfilefd = open(tmpfilename, O_RDONLY);
read(tmpfilefd, testdatacopy, sizeof(testdatacopy));