Commit 31637cd56a5ed339fdebc9cd51af8f50a7794f24

Vicent Martí 2012-07-27T11:09:04

Merge pull request #839 from nulltoken/topic/odb-foreach-documentation odb: add some documentation to the foreach() test

diff --git a/tests-clar/odb/foreach.c b/tests-clar/odb/foreach.c
index 525c70c..e5d01ea 100644
--- a/tests-clar/odb/foreach.c
+++ b/tests-clar/odb/foreach.c
@@ -29,8 +29,18 @@ static int foreach_cb(git_oid *oid, void *data)
 	return 0;
 }
 
+/*
+ * $ git --git-dir tests-clar/resources/testrepo.git count-objects --verbose
+ * count: 43
+ * size: 3
+ * in-pack: 1640
+ * packs: 3
+ * size-pack: 425
+ * prune-packable: 0
+ * garbage: 0
+ */
 void test_odb_foreach__foreach(void)
 {
 	cl_git_pass(git_odb_foreach(_odb, foreach_cb, NULL));
-	cl_assert(nobj == 1683);
+	cl_assert_equal_i(43 + 1640, nobj); /* count + in-pack */
 }