From: Michihiro NAKAJIMA Date: Tue, 17 Nov 2009 13:47:37 +0000 (-0500) Subject: Use assertEqualInt instead of assert. X-Git-Tag: v2.8.0~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e73cfdcd65460d945f85bc5de08f3081d755cbd2;p=thirdparty%2Flibarchive.git Use assertEqualInt instead of assert. Suggested by Tim SVN-Revision: 1668 --- diff --git a/libarchive/test/test_read_large.c b/libarchive/test/test_read_large.c index 0af6c1c7c..654ca7606 100644 --- a/libarchive/test/test_read_large.c +++ b/libarchive/test/test_read_large.c @@ -83,7 +83,8 @@ DEFINE_TEST(test_read_large) assertA(0 == archive_read_finish(a)); f = fopen(tmpfilename, "rb"); - assert(sizeof(testdatacopy) == fread(testdatacopy, 1, sizeof(testdatacopy), f)); + assertEqualInt(sizeof(testdatacopy), + fread(testdatacopy, 1, sizeof(testdatacopy), f)); fclose(f); assert(0 == memcmp(testdata, testdatacopy, sizeof(testdata))); } diff --git a/tar/test/test_copy.c b/tar/test/test_copy.c index 32417b7ab..69112900e 100644 --- a/tar/test/test_copy.c +++ b/tar/test/test_copy.c @@ -144,7 +144,7 @@ create_tree(void) } assertMakeDir("original", 0775); - assert(0 == chdir("original")); + assertEqualInt(0, chdir("original")); LOOP_MAX = compute_loop_max(); assertMakeDir("f", 0775); @@ -181,7 +181,7 @@ create_tree(void) assertMakeDir(buff, 0775); } - assert(0 == chdir("..")); + assertEqualInt(0, chdir("..")); } #define LIMIT_NONE 200 @@ -356,7 +356,7 @@ copy_ustar(void) assertEmptyFile("unpack.out"); verify_tree(LIMIT_USTAR); - assert(0 == chdir("../..")); + assertEqualInt(0, chdir("../..")); } DEFINE_TEST(test_copy)