Commit 6183f0e2 by nulltoken

merge: cleanup tests

parent 66798ad0
...@@ -16,9 +16,9 @@ void test_revwalk_mergebase__single1(void) ...@@ -16,9 +16,9 @@ void test_revwalk_mergebase__single1(void)
{ {
git_oid result, one, two, expected; git_oid result, one, two, expected;
git_oid_fromstr(&one, "c47800c7266a2be04c571c04d5a6614691ea99bd "); cl_git_pass(git_oid_fromstr(&one, "c47800c7266a2be04c571c04d5a6614691ea99bd "));
git_oid_fromstr(&two, "9fd738e8f7967c078dceed8190330fc8648ee56a"); cl_git_pass(git_oid_fromstr(&two, "9fd738e8f7967c078dceed8190330fc8648ee56a"));
git_oid_fromstr(&expected, "5b5b025afb0b4c913b4c338a42934a3863bf3644"); cl_git_pass(git_oid_fromstr(&expected, "5b5b025afb0b4c913b4c338a42934a3863bf3644"));
cl_git_pass(git_merge_base(&result, _repo, &one, &two)); cl_git_pass(git_merge_base(&result, _repo, &one, &two));
cl_assert(git_oid_cmp(&result, &expected) == 0); cl_assert(git_oid_cmp(&result, &expected) == 0);
...@@ -28,9 +28,9 @@ void test_revwalk_mergebase__single2(void) ...@@ -28,9 +28,9 @@ void test_revwalk_mergebase__single2(void)
{ {
git_oid result, one, two, expected; git_oid result, one, two, expected;
git_oid_fromstr(&one, "763d71aadf09a7951596c9746c024e7eece7c7af"); cl_git_pass(git_oid_fromstr(&one, "763d71aadf09a7951596c9746c024e7eece7c7af"));
git_oid_fromstr(&two, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750"); cl_git_pass(git_oid_fromstr(&two, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750"));
git_oid_fromstr(&expected, "c47800c7266a2be04c571c04d5a6614691ea99bd"); cl_git_pass(git_oid_fromstr(&expected, "c47800c7266a2be04c571c04d5a6614691ea99bd"));
cl_git_pass(git_merge_base(&result, _repo, &one, &two)); cl_git_pass(git_merge_base(&result, _repo, &one, &two));
cl_assert(git_oid_cmp(&result, &expected) == 0); cl_assert(git_oid_cmp(&result, &expected) == 0);
...@@ -40,9 +40,9 @@ void test_revwalk_mergebase__merged_branch(void) ...@@ -40,9 +40,9 @@ void test_revwalk_mergebase__merged_branch(void)
{ {
git_oid result, one, two, expected; git_oid result, one, two, expected;
git_oid_fromstr(&one, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750"); cl_git_pass(git_oid_fromstr(&one, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750"));
git_oid_fromstr(&two, "9fd738e8f7967c078dceed8190330fc8648ee56a"); cl_git_pass(git_oid_fromstr(&two, "9fd738e8f7967c078dceed8190330fc8648ee56a"));
git_oid_fromstr(&expected, "9fd738e8f7967c078dceed8190330fc8648ee56a"); cl_git_pass(git_oid_fromstr(&expected, "9fd738e8f7967c078dceed8190330fc8648ee56a"));
cl_git_pass(git_merge_base(&result, _repo, &one, &two)); cl_git_pass(git_merge_base(&result, _repo, &one, &two));
cl_assert(git_oid_cmp(&result, &expected) == 0); cl_assert(git_oid_cmp(&result, &expected) == 0);
...@@ -53,12 +53,11 @@ void test_revwalk_mergebase__merged_branch(void) ...@@ -53,12 +53,11 @@ void test_revwalk_mergebase__merged_branch(void)
void test_revwalk_mergebase__no_common_ancestor_returns_ENOTFOUND(void) void test_revwalk_mergebase__no_common_ancestor_returns_ENOTFOUND(void)
{ {
git_oid result, one, two, expected; git_oid result, one, two;
int error; int error;
git_oid_fromstr(&one, "763d71aadf09a7951596c9746c024e7eece7c7af"); cl_git_pass(git_oid_fromstr(&one, "763d71aadf09a7951596c9746c024e7eece7c7af"));
git_oid_fromstr(&two, "e90810b8df3e80c413d903f631643c716887138d"); cl_git_pass(git_oid_fromstr(&two, "e90810b8df3e80c413d903f631643c716887138d"));
git_oid_fromstr(&expected, "c47800c7266a2be04c571c04d5a6614691ea99bd");
error = git_merge_base(&result, _repo, &one, &two); error = git_merge_base(&result, _repo, &one, &two);
cl_git_fail(error); cl_git_fail(error);
......
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