diff options
author | Russell Belfer <rb@github.com> | 2013-05-01 15:18:46 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-05-01 15:18:46 +0400 |
commit | 3e199f428513fbf04b126d536409deae1c6d045f (patch) | |
tree | 6ab399571ad8fc179297181db3e0e6c992f59652 /tests-clar/refs | |
parent | cfcdbc100a993094ac1f094aa908ed4da472d106 (diff) |
Set error message for branch functions
There were a couple of places where an error was being returned
from branch related code but no error message was being set.
Diffstat (limited to 'tests-clar/refs')
-rw-r--r-- | tests-clar/refs/branches/remote.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests-clar/refs/branches/remote.c b/tests-clar/refs/branches/remote.c index 6043828b3..c110adb33 100644 --- a/tests-clar/refs/branches/remote.c +++ b/tests-clar/refs/branches/remote.c @@ -49,16 +49,20 @@ void test_refs_branches_remote__no_matching_remote_returns_error(void) { const char *unknown = "refs/remotes/nonexistent/master"; + giterr_clear(); cl_git_fail_with(git_branch_remote_name( NULL, 0, g_repo, unknown), GIT_ENOTFOUND); + cl_assert(giterr_last() != NULL); } void test_refs_branches_remote__local_remote_returns_error(void) { const char *local = "refs/heads/master"; + giterr_clear(); cl_git_fail_with(git_branch_remote_name( NULL, 0, g_repo, local), GIT_ERROR); + cl_assert(giterr_last() != NULL); } void test_refs_branches_remote__ambiguous_remote_returns_error(void) @@ -75,6 +79,8 @@ void test_refs_branches_remote__ambiguous_remote_returns_error(void) git_remote_free(remote); + giterr_clear(); cl_git_fail_with(git_branch_remote_name(NULL, 0, g_repo, remote_tracking_branch_name), GIT_EAMBIGUOUS); + cl_assert(giterr_last() != NULL); } |