Commit 498d0801a1348248f7759436e6cc464cc11b2205

Edward Thomson 2016-07-22T12:01:24

tests: use a `size_t`

diff --git a/tests/iterator/iterator_helpers.c b/tests/iterator/iterator_helpers.c
index a3e8032..ae48fcd 100644
--- a/tests/iterator/iterator_helpers.c
+++ b/tests/iterator/iterator_helpers.c
@@ -18,18 +18,16 @@ static void assert_at_end(git_iterator *i, bool verbose)
 
 void expect_iterator_items(
 	git_iterator *i,
-	int expected_flat,
+	size_t expected_flat,
 	const char **expected_flat_paths,
-	int expected_total,
+	size_t expected_total,
 	const char **expected_total_paths)
 {
 	const git_index_entry *entry;
-	int count, error;
+	size_t count;
 	int no_trees = !(git_iterator_flags(i) & GIT_ITERATOR_INCLUDE_TREES);
 	bool v = false;
-
-	if (expected_flat < 0) { v = true; expected_flat = -expected_flat; }
-	if (expected_total < 0) { v = true; expected_total = -expected_total; }
+	int error;
 
 	if (v) fprintf(stderr, "== %s ==\n", no_trees ? "notrees" : "trees");
 
diff --git a/tests/iterator/iterator_helpers.h b/tests/iterator/iterator_helpers.h
index 8d0a170..1884b41 100644
--- a/tests/iterator/iterator_helpers.h
+++ b/tests/iterator/iterator_helpers.h
@@ -1,9 +1,9 @@
 
 extern void expect_iterator_items(
 	git_iterator *i,
-	int expected_flat,
+	size_t expected_flat,
 	const char **expected_flat_paths,
-	int expected_total,
+	size_t expected_total,
 	const char **expected_total_paths);
 
 extern void expect_advance_over(