diff options
Diffstat (limited to 'tests/commit')
| -rw-r--r-- | tests/commit/commit.c | 6 | ||||
| -rw-r--r-- | tests/commit/signature.c | 4 | ||||
| -rw-r--r-- | tests/commit/write.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/tests/commit/commit.c b/tests/commit/commit.c index 38397d2df..f5461cfd3 100644 --- a/tests/commit/commit.c +++ b/tests/commit/commit.c @@ -38,8 +38,12 @@ void test_commit_commit__create_unexisting_update_ref(void) cl_git_pass(git_commit_create(&oid, _repo, "refs/heads/foo/bar", s, s, NULL, "some msg", tree, 1, (const git_commit **) &commit)); + /* fail because the parent isn't the tip of the branch anymore */ + cl_git_fail(git_commit_create(&oid, _repo, "refs/heads/foo/bar", s, s, + NULL, "some msg", tree, 1, (const git_commit **) &commit)); + cl_git_pass(git_reference_lookup(&ref, _repo, "refs/heads/foo/bar")); - cl_assert(!git_oid_cmp(&oid, git_reference_target(ref))); + cl_assert_equal_oid(&oid, git_reference_target(ref)); git_tree_free(tree); git_commit_free(commit); diff --git a/tests/commit/signature.c b/tests/commit/signature.c index e9dcfab41..41a74b999 100644 --- a/tests/commit/signature.c +++ b/tests/commit/signature.c @@ -56,8 +56,8 @@ void test_commit_signature__create_empties(void) cl_git_fail(try_build_signature("", "emeric.fermas@gmail.com", 1234567890, 60)); cl_git_fail(try_build_signature(" ", "emeric.fermas@gmail.com", 1234567890, 60)); - cl_git_pass(try_build_signature("nulltoken", "", 1234567890, 60)); - cl_git_pass(try_build_signature("nulltoken", " ", 1234567890, 60)); + cl_git_fail(try_build_signature("nulltoken", "", 1234567890, 60)); + cl_git_fail(try_build_signature("nulltoken", " ", 1234567890, 60)); } void test_commit_signature__create_one_char(void) diff --git a/tests/commit/write.c b/tests/commit/write.c index b1cdf4485..6212ef641 100644 --- a/tests/commit/write.c +++ b/tests/commit/write.c @@ -145,7 +145,7 @@ void test_commit_write__root(void) cl_assert(git_commit_parentcount(commit) == 0); cl_git_pass(git_reference_lookup(&branch, g_repo, branch_name)); branch_oid = git_reference_target(branch); - cl_git_pass(git_oid_cmp(branch_oid, &commit_id)); + cl_assert_equal_oid(branch_oid, &commit_id); cl_assert_equal_s(root_commit_message, git_commit_message(commit)); cl_git_pass(git_reflog_read(&log, g_repo, branch_name)); |
