summaryrefslogtreecommitdiff
path: root/tests/core
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-02-07 11:20:36 -0800
committerRussell Belfer <rb@github.com>2014-04-17 14:43:45 -0700
commitc67fd4c9d5e1ff715df28b884d7f7f9f20fad1ec (patch)
tree831176f87c09d36816a83ef5617623fd372f5e50 /tests/core
parentc5cacc4ec2c13e93164b8e3013b0d18c8c6d820c (diff)
downloadlibgit2-c67fd4c9d5e1ff715df28b884d7f7f9f20fad1ec.tar.gz
Some vector utility tweaks
This is just laying some groundwork for internal index changes that I'm working on.
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/vector.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/core/vector.c b/tests/core/vector.c
index db52c004f..66f90b82b 100644
--- a/tests/core/vector.c
+++ b/tests/core/vector.c
@@ -190,8 +190,9 @@ void test_core_vector__5(void)
git_vector_free(&x);
}
-static int remove_ones(const git_vector *v, size_t idx)
+static int remove_ones(const git_vector *v, size_t idx, void *p)
{
+ GIT_UNUSED(p);
return (git_vector_get(v, idx) == (void *)0x001);
}
@@ -206,7 +207,7 @@ void test_core_vector__remove_matching(void)
git_vector_insert(&x, (void*) 0x001);
cl_assert(x.length == 1);
- git_vector_remove_matching(&x, remove_ones);
+ git_vector_remove_matching(&x, remove_ones, NULL);
cl_assert(x.length == 0);
git_vector_insert(&x, (void*) 0x001);
@@ -214,7 +215,7 @@ void test_core_vector__remove_matching(void)
git_vector_insert(&x, (void*) 0x001);
cl_assert(x.length == 3);
- git_vector_remove_matching(&x, remove_ones);
+ git_vector_remove_matching(&x, remove_ones, NULL);
cl_assert(x.length == 0);
git_vector_insert(&x, (void*) 0x002);
@@ -223,7 +224,7 @@ void test_core_vector__remove_matching(void)
git_vector_insert(&x, (void*) 0x001);
cl_assert(x.length == 4);
- git_vector_remove_matching(&x, remove_ones);
+ git_vector_remove_matching(&x, remove_ones, NULL);
cl_assert(x.length == 2);
git_vector_foreach(&x, i, compare) {
@@ -238,7 +239,7 @@ void test_core_vector__remove_matching(void)
git_vector_insert(&x, (void*) 0x001);
cl_assert(x.length == 4);
- git_vector_remove_matching(&x, remove_ones);
+ git_vector_remove_matching(&x, remove_ones, NULL);
cl_assert(x.length == 2);
git_vector_foreach(&x, i, compare) {
@@ -253,7 +254,7 @@ void test_core_vector__remove_matching(void)
git_vector_insert(&x, (void*) 0x001);
cl_assert(x.length == 4);
- git_vector_remove_matching(&x, remove_ones);
+ git_vector_remove_matching(&x, remove_ones, NULL);
cl_assert(x.length == 2);
git_vector_foreach(&x, i, compare) {
@@ -268,7 +269,7 @@ void test_core_vector__remove_matching(void)
git_vector_insert(&x, (void*) 0x003);
cl_assert(x.length == 4);
- git_vector_remove_matching(&x, remove_ones);
+ git_vector_remove_matching(&x, remove_ones, NULL);
cl_assert(x.length == 4);
git_vector_free(&x);