diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2014-07-01 22:09:01 +0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2014-07-01 22:40:16 +0400 |
commit | 0cee70ebb7297f155129e0d05f5a23be82231256 (patch) | |
tree | 6d98f55d737f4187e58f2a180ffb75f05b98bfba /tests/stash | |
parent | e1fc03c9baea9864dec90d0aef7aadcc2ff20576 (diff) |
Introduce cl_assert_equal_oid
Diffstat (limited to 'tests/stash')
-rw-r--r-- | tests/stash/drop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/stash/drop.c b/tests/stash/drop.c index 63ff0377c..89a0ade72 100644 --- a/tests/stash/drop.c +++ b/tests/stash/drop.c @@ -115,7 +115,7 @@ void test_stash_drop__dropping_an_entry_rewrites_reflog_history(void) cl_git_pass(git_reflog_read(&reflog, repo, GIT_REFS_STASH_FILE)); entry = git_reflog_entry_byindex(reflog, 0); - cl_assert_equal_i(0, git_oid_cmp(&oid, git_reflog_entry_id_old(entry))); + cl_assert_equal_oid(&oid, git_reflog_entry_id_old(entry)); cl_assert_equal_sz(count - 1, git_reflog_entrycount(reflog)); git_reflog_free(reflog); @@ -147,7 +147,7 @@ void retrieve_top_stash_id(git_oid *out) cl_git_pass(git_revparse_single(&top_stash, repo, "stash@{0}")); cl_git_pass(git_reference_name_to_id(out, repo, GIT_REFS_STASH_FILE)); - cl_assert_equal_i(true, git_oid_cmp(out, git_object_id(top_stash)) == 0); + cl_assert_equal_oid(out, git_object_id(top_stash)); git_object_free(top_stash); } @@ -162,13 +162,13 @@ void test_stash_drop__dropping_the_top_stash_updates_the_stash_reference(void) retrieve_top_stash_id(&oid); cl_git_pass(git_revparse_single(&next_top_stash, repo, "stash@{1}")); - cl_assert(git_oid_cmp(&oid, git_object_id(next_top_stash)) != 0); + cl_assert(git_oid_cmp(&oid, git_object_id(next_top_stash))); cl_git_pass(git_stash_drop(repo, 0)); retrieve_top_stash_id(&oid); - cl_git_pass(git_oid_cmp(&oid, git_object_id(next_top_stash))); + cl_assert_equal_oid(&oid, git_object_id(next_top_stash)); git_object_free(next_top_stash); } |