summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-07-22 12:01:24 -0400
committerEdward Thomson <ethomson@github.com>2016-07-24 15:49:19 -0400
commit498d0801a1348248f7759436e6cc464cc11b2205 (patch)
tree4426b753ac7d7586ad126f7eff9abb1620509c55
parent60e15ecd5518f26fa2d18cca9ab22b248596e68c (diff)
downloadlibgit2-498d0801a1348248f7759436e6cc464cc11b2205.tar.gz
tests: use a `size_t`
-rw-r--r--tests/iterator/iterator_helpers.c10
-rw-r--r--tests/iterator/iterator_helpers.h4
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/iterator/iterator_helpers.c b/tests/iterator/iterator_helpers.c
index a3e803299..ae48fcd46 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 8d0a17014..1884b41a1 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(