Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-05-06 17:45:53 +0400
committerVicent Martí <vicent@github.com>2013-05-06 17:45:53 +0400
commit03c28d92d00074f1501cb0d7ce9f5e3e0154a244 (patch)
tree64c394dc10a839fd0766a800ff31a1d0236360d6 /tests-clar/refs
parentd5e5bbd7193924aa845e107f747a15814a679b10 (diff)
parent6e286e8dc59874db30b6fbb0ca5d32d4a2b5642c (diff)
Merge pull request #1526 from arrbee/cleanup-error-return-without-msg
Make sure error messages are set for most error returns
Diffstat (limited to 'tests-clar/refs')
-rw-r--r--tests-clar/refs/branches/remote.c6
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);
}