diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-09-19 05:38:18 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-09-19 05:38:18 -0400 |
| commit | c8d5b43bbcf0bb04d0d20602248c0eb905b2c81f (patch) | |
| tree | b8fc40e949b66859f791e552dbb52f490e3ccf6d /tests/libgit2/core | |
| parent | d111cc9b62eafe036dd9ac3ba462f0165db5f52a (diff) | |
| download | libgit2-c8d5b43bbcf0bb04d0d20602248c0eb905b2c81f.tar.gz | |
tests: skip sha256 tests when not compiled in
Actually `cl_skip` the sha256 tests when we're not compiled for sha256,
instead of passing them.
Diffstat (limited to 'tests/libgit2/core')
| -rw-r--r-- | tests/libgit2/core/oid.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/libgit2/core/oid.c b/tests/libgit2/core/oid.c index 9fe4413b7..90fb37514 100644 --- a/tests/libgit2/core/oid.c +++ b/tests/libgit2/core/oid.c @@ -52,7 +52,9 @@ void test_core_oid__streq_sha1(void) void test_core_oid__streq_sha256(void) { -#ifdef GIT_EXPERIMENTAL_SHA256 +#ifndef GIT_EXPERIMENTAL_SHA256 + cl_skip(); +#else cl_assert_equal_i(0, git_oid_streq(&id_sha256, str_oid_sha256)); cl_assert_equal_i(-1, git_oid_streq(&id_sha256, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef")); @@ -90,7 +92,9 @@ void test_core_oid__strcmp_sha1(void) void test_core_oid__strcmp_sha256(void) { -#ifdef GIT_EXPERIMENTAL_SHA256 +#ifndef GIT_EXPERIMENTAL_SHA256 + cl_skip(); +#else cl_assert_equal_i(0, git_oid_strcmp(&id_sha256, str_oid_sha256)); cl_assert(git_oid_strcmp(&id_sha256, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef") < 0); @@ -129,7 +133,9 @@ void test_core_oid__ncmp_sha1(void) void test_core_oid__ncmp_sha256(void) { -#ifdef GIT_EXPERIMENTAL_SHA256 +#ifndef GIT_EXPERIMENTAL_SHA256 + cl_skip(); +#else cl_assert(!git_oid_ncmp(&id_sha256, &idp_sha256, 0)); cl_assert(!git_oid_ncmp(&id_sha256, &idp_sha256, 1)); cl_assert(!git_oid_ncmp(&id_sha256, &idp_sha256, 2)); |
