tests: use a `size_t`
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
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(