From 0cee70ebb7297f155129e0d05f5a23be82231256 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 1 Jul 2014 14:09:01 -0400 Subject: Introduce cl_assert_equal_oid --- tests/notes/notes.c | 8 ++++---- tests/notes/notesref.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/notes') 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); } diff --git a/tests/notes/notesref.c b/tests/notes/notesref.c index a33141979..a59af209c 100644 --- a/tests/notes/notesref.c +++ b/tests/notes/notesref.c @@ -46,13 +46,13 @@ void test_notes_notesref__config_corenotesref(void) cl_git_pass(git_note_read(&_note, _repo, NULL, &oid)); cl_assert_equal_s("test123test\n", git_note_message(_note)); - 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); cl_git_pass(git_note_read(&_note, _repo, "refs/notes/mydefaultnotesref", &oid)); cl_assert_equal_s("test123test\n", git_note_message(_note)); - cl_assert(!git_oid_cmp(git_note_id(_note), ¬e_oid)); + cl_assert_equal_oid(git_note_id(_note), ¬e_oid); cl_git_pass(git_note_default_ref(&default_ref, _repo)); cl_assert_equal_s("refs/notes/mydefaultnotesref", default_ref); -- cgit v1.2.1