diff options
author | Vicent Marti <vicent@github.com> | 2014-07-02 15:29:25 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-07-02 15:29:25 +0200 |
commit | c1bf2942fcdc90883987c37a782b599d8969e747 (patch) | |
tree | 01b176117d561a3f3f2adf4c1147f7ffb0be8050 /tests/notes/notes.c | |
parent | 4df4ebd7c772a6dca577fd2968d7f81e72e4cff2 (diff) | |
parent | 9879fee184adaace842ed4bb055fd2942d975591 (diff) | |
download | libgit2-c1bf2942fcdc90883987c37a782b599d8969e747.tar.gz |
Merge pull request #2455 from ethomson/equal_oid
Introduce `cl_assert_equal_oid`
Diffstat (limited to 'tests/notes/notes.c')
-rw-r--r-- | tests/notes/notes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/notes/notes.c b/tests/notes/notes.c index e48d9df0e..8b1b57866 100644 --- a/tests/notes/notes.c +++ b/tests/notes/notes.c @@ -21,7 +21,7 @@ static void assert_note_equal(git_note *note, char *message, git_oid *note_oid) git_blob *blob; cl_assert_equal_s(git_note_message(note), message); - cl_assert(!git_oid_cmp(git_note_id(note), note_oid)); + cl_assert_equal_oid(git_note_id(note), note_oid); cl_git_pass(git_blob_lookup(&blob, _repo, note_oid)); cl_assert_equal_s(git_note_message(note), (const char *)git_blob_rawcontent(blob)); @@ -61,10 +61,10 @@ static int note_list_cb( cl_assert(*count < EXPECTATIONS_COUNT); cl_git_pass(git_oid_fromstr(&expected_note_oid, list_expectations[*count].note_sha)); - cl_assert(git_oid_cmp(&expected_note_oid, blob_id) == 0); + cl_assert_equal_oid(&expected_note_oid, blob_id); cl_git_pass(git_oid_fromstr(&expected_target_oid, list_expectations[*count].annotated_object_sha)); - cl_assert(git_oid_cmp(&expected_target_oid, annotated_obj_id) == 0); + cl_assert_equal_oid(&expected_target_oid, annotated_obj_id); (*count)++; @@ -290,7 +290,7 @@ void test_notes_notes__can_read_a_note_in_an_existing_fanout(void) cl_git_pass(git_note_read(¬e, _repo, "refs/notes/fanout", &target_oid)); cl_git_pass(git_oid_fromstr(¬e_oid, "08b041783f40edfe12bb406c9c9a8a040177c125")); - cl_assert(!git_oid_cmp(git_note_id(note), ¬e_oid)); + cl_assert_equal_oid(git_note_id(note), ¬e_oid); git_note_free(note); } |