summaryrefslogtreecommitdiff
path: root/tests/notes
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2014-07-01 14:09:01 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2014-07-01 14:40:16 -0400
commit0cee70ebb7297f155129e0d05f5a23be82231256 (patch)
tree6d98f55d737f4187e58f2a180ffb75f05b98bfba /tests/notes
parente1fc03c9baea9864dec90d0aef7aadcc2ff20576 (diff)
downloadlibgit2-0cee70ebb7297f155129e0d05f5a23be82231256.tar.gz
Introduce cl_assert_equal_oid
Diffstat (limited to 'tests/notes')
-rw-r--r--tests/notes/notes.c8
-rw-r--r--tests/notes/notesref.c4
2 files changed, 6 insertions, 6 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(&note, _repo, "refs/notes/fanout", &target_oid));
cl_git_pass(git_oid_fromstr(&note_oid, "08b041783f40edfe12bb406c9c9a8a040177c125"));
- cl_assert(!git_oid_cmp(git_note_id(note), &note_oid));
+ cl_assert_equal_oid(git_note_id(note), &note_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), &note_oid));
+ cl_assert_equal_oid(git_note_id(_note), &note_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), &note_oid));
+ cl_assert_equal_oid(git_note_id(_note), &note_oid);
cl_git_pass(git_note_default_ref(&default_ref, _repo));
cl_assert_equal_s("refs/notes/mydefaultnotesref", default_ref);