Commit 9879fee184adaace842ed4bb055fd2942d975591

Edward Thomson 2014-07-01T14:11:14

revwalk::simplify test should test The revwalk::simplify test was not actually tested the values from the revwalk against the expected. (Further, the expected had two IDs transposed.)

diff --git a/tests/revwalk/simplify.c b/tests/revwalk/simplify.c
index 81c19d3..f65ce6c 100644
--- a/tests/revwalk/simplify.c
+++ b/tests/revwalk/simplify.c
@@ -20,8 +20,8 @@ static const char *commit_head = "a4a7dce85cf63874e984719f4fdd239f5145052f";
 static const char *expected_str[] = {
 	"a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
 	"c47800c7266a2be04c571c04d5a6614691ea99bd", /* 3 */
-	"8496071c1b46c854b31185ea97743be6a8774479", /* 4 */
-	"5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 5 */
+	"5b5b025afb0b4c913b4c338a42934a3863bf3644", /* 4 */
+	"8496071c1b46c854b31185ea97743be6a8774479", /* 5 */
 };
 
 void test_revwalk_simplify__first_parent(void)
@@ -44,7 +44,7 @@ void test_revwalk_simplify__first_parent(void)
 
 	i = 0;
 	while ((error = git_revwalk_next(&id, walk)) == 0) {
-		git_oid_cmp(&id, &expected[i]);
+		cl_assert_equal_oid(&expected[i], &id);
 		i++;
 	}