Fixing broken tests.

This commit is contained in:
Ben Straub 2012-05-10 09:48:14 -07:00
parent a346992f7e
commit d13c1a8b60
2 changed files with 5 additions and 5 deletions

View File

@ -98,7 +98,7 @@ void test_network_remotelocal__retrieve_advertised_references(void)
cl_git_pass(git_remote_ls(remote, &count_ref__cb, &how_many_refs)); cl_git_pass(git_remote_ls(remote, &count_ref__cb, &how_many_refs));
cl_assert(how_many_refs == 14); /* 1 HEAD + 6 heads + 1 lightweight tag + 3 annotated tags + 3 peeled target */ cl_assert_equal_i(how_many_refs, 19);
} }
void test_network_remotelocal__retrieve_advertised_references_from_spaced_repository(void) void test_network_remotelocal__retrieve_advertised_references_from_spaced_repository(void)
@ -112,7 +112,7 @@ void test_network_remotelocal__retrieve_advertised_references_from_spaced_reposi
cl_git_pass(git_remote_ls(remote, &count_ref__cb, &how_many_refs)); cl_git_pass(git_remote_ls(remote, &count_ref__cb, &how_many_refs));
cl_assert(how_many_refs == 14); /* 1 HEAD + 6 heads + 1 lightweight tag + 3 annotated tags + 3 peeled target */ cl_assert_equal_i(how_many_refs, 19);
git_remote_free(remote); /* Disconnect from the "spaced repo" before the cleanup */ git_remote_free(remote); /* Disconnect from the "spaced repo" before the cleanup */
remote = NULL; remote = NULL;

View File

@ -30,17 +30,17 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count)
{ {
cl_git_pass(git_branch_list(&branch_list, repo, flags)); cl_git_pass(git_branch_list(&branch_list, repo, flags));
cl_assert(branch_list.count == expected_count); cl_assert_equal_i(branch_list.count, expected_count);
} }
void test_refs_branches_listall__retrieve_all_branches(void) void test_refs_branches_listall__retrieve_all_branches(void)
{ {
assert_retrieval(GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, 6 + 1); assert_retrieval(GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, 8);
} }
void test_refs_branches_listall__retrieve_remote_branches(void) void test_refs_branches_listall__retrieve_remote_branches(void)
{ {
assert_retrieval(GIT_BRANCH_REMOTE, 1); assert_retrieval(GIT_BRANCH_REMOTE, 2);
} }
void test_refs_branches_listall__retrieve_local_branches(void) void test_refs_branches_listall__retrieve_local_branches(void)