Commit 9e4e25b1 by Patrick Steinhardt

tests: refs: modernize coding style of testcase

The coding style of the testcase refs::create::propagate_eexists is not
really up-to-date. Convert it to use a more modern coding style.
parent 45901d3e
......@@ -212,17 +212,12 @@ void test_refs_create__oid_unknown_fails_by_default(void)
void test_refs_create__propagate_eexists(void)
{
int error;
git_oid oid;
git_reference *ref;
/* Make sure it works for oid and for symbolic both */
git_oid_fromstr(&oid, current_master_tip);
error = git_reference_create(&ref, g_repo, current_head_target, &oid, false, NULL);
cl_assert(error == GIT_EEXISTS);
error = git_reference_symbolic_create(&ref, g_repo, "HEAD", current_head_target, false, NULL);
cl_assert(error == GIT_EEXISTS);
cl_git_pass(git_oid_fromstr(&oid, current_master_tip));
cl_git_fail_with(GIT_EEXISTS, git_reference_create(NULL, g_repo, current_head_target, &oid, false, NULL));
cl_git_fail_with(GIT_EEXISTS, git_reference_symbolic_create(NULL, g_repo, "HEAD", current_head_target, false, NULL));
}
void test_refs_create__existing_dir_propagates_edirectory(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment