diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-04-16 19:46:41 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-16 19:46:41 +0400 |
commit | a50086d174658914d4d6462afbc83b02825b1f5b (patch) | |
tree | e8daa1c7bf678222cf351445179837bed7db3a72 /tests-clar/notes/notesref.c | |
parent | 5b9fac39d8a76b9139667c26a63e6b3f204b3977 (diff) | |
parent | f124ebd457bfbf43de3516629aaba5a279636e04 (diff) |
Merge branch 'development'v0.18.0
Diffstat (limited to 'tests-clar/notes/notesref.c')
-rw-r--r-- | tests-clar/notes/notesref.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests-clar/notes/notesref.c b/tests-clar/notes/notesref.c index 79ad0afee..c89b71ba5 100644 --- a/tests-clar/notes/notesref.c +++ b/tests-clar/notes/notesref.c @@ -16,10 +16,17 @@ void test_notes_notesref__initialize(void) void test_notes_notesref__cleanup(void) { git_note_free(_note); + _note = NULL; + git_signature_free(_sig); + _sig = NULL; + git_config_free(_cfg); + _cfg = NULL; git_repository_free(_repo); + _repo = NULL; + cl_fixture_cleanup("testrepo.git"); } @@ -35,23 +42,23 @@ void test_notes_notesref__config_corenotesref(void) cl_git_pass(git_config_set_string(_cfg, "core.notesRef", "refs/notes/mydefaultnotesref")); - cl_git_pass(git_note_create(¬e_oid, _repo, _sig, _sig, NULL, &oid, "test123test\n")); + cl_git_pass(git_note_create(¬e_oid, _repo, _sig, _sig, NULL, &oid, "test123test\n", 0)); cl_git_pass(git_note_read(&_note, _repo, NULL, &oid)); - cl_assert(!strcmp(git_note_message(_note), "test123test\n")); + cl_assert_equal_s("test123test\n", git_note_message(_note)); cl_assert(!git_oid_cmp(git_note_oid(_note), ¬e_oid)); git_note_free(_note); cl_git_pass(git_note_read(&_note, _repo, "refs/notes/mydefaultnotesref", &oid)); - cl_assert(!strcmp(git_note_message(_note), "test123test\n")); + cl_assert_equal_s("test123test\n", git_note_message(_note)); cl_assert(!git_oid_cmp(git_note_oid(_note), ¬e_oid)); cl_git_pass(git_note_default_ref(&default_ref, _repo)); - cl_assert(!strcmp(default_ref, "refs/notes/mydefaultnotesref")); + cl_assert_equal_s("refs/notes/mydefaultnotesref", default_ref); - cl_git_pass(git_config_delete(_cfg, "core.notesRef")); + cl_git_pass(git_config_delete_entry(_cfg, "core.notesRef")); cl_git_pass(git_note_default_ref(&default_ref, _repo)); - cl_assert(!strcmp(default_ref, GIT_NOTES_DEFAULT_REF)); + cl_assert_equal_s(GIT_NOTES_DEFAULT_REF, default_ref); } |