aboutsummaryrefslogtreecommitdiff
path: root/libarchive/test/test_archive_api_feature.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/test/test_archive_api_feature.c')
-rw-r--r--libarchive/test/test_archive_api_feature.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/libarchive/test/test_archive_api_feature.c b/libarchive/test/test_archive_api_feature.c
index 23a7083c07fa..d551e6a01ebc 100644
--- a/libarchive/test/test_archive_api_feature.c
+++ b/libarchive/test/test_archive_api_feature.c
@@ -38,7 +38,7 @@ DEFINE_TEST(test_archive_api_feature)
archive_version_number() % 1000);
failure("Version string is: %s, computed is: %s",
archive_version_string(), buff);
- assert(memcmp(buff, archive_version_string(), strlen(buff)) == 0);
+ assertEqualMem(buff, archive_version_string(), strlen(buff));
if (strlen(buff) < strlen(archive_version_string())) {
p = archive_version_string() + strlen(buff);
failure("Version string is: %s", archive_version_string());
@@ -47,30 +47,4 @@ DEFINE_TEST(test_archive_api_feature)
failure("Version string is: %s", archive_version_string());
assert(*p == '\0');
}
-
-/* This is all scheduled to disappear in libarchive 3.0 */
-#if ARCHIVE_VERSION_NUMBER < 3000000
- assertEqualInt(ARCHIVE_VERSION_STAMP, ARCHIVE_VERSION_NUMBER);
- assertEqualInt(ARCHIVE_API_FEATURE, archive_api_feature());
- assertEqualInt(ARCHIVE_API_VERSION, archive_api_version());
- /*
- * Even though ARCHIVE_VERSION_STAMP only appears in
- * archive.h after 1.9.0 and 2.2.3, the macro is synthesized
- * in test.h, so this test is always valid.
- */
- assertEqualInt(ARCHIVE_VERSION_STAMP / 1000, ARCHIVE_API_VERSION * 1000 + ARCHIVE_API_FEATURE);
- /*
- * The function, however, isn't always available. It appeared
- * sometime in the middle of 2.2.3, but the synthesized value
- * never has a release version, so the following conditional
- * exactly determines whether the current library has the
- * function.
- */
-#if ARCHIVE_VERSION_STAMP / 1000 == 1009 || ARCHIVE_VERSION_STAMP > 2002000
- assertEqualInt(ARCHIVE_VERSION_STAMP, archive_version_stamp());
-#else
- skipping("archive_version_stamp()");
-#endif
- assertEqualString(ARCHIVE_LIBRARY_VERSION, archive_version());
-#endif
}