Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2013-01-27 23:17:07 +0400
committerPhilip Kelley <phkelley@hotmail.com>2013-01-27 23:17:07 +0400
commit11d9f6b30438a141def883b0115f7f764c03e990 (patch)
treeabe54e8085c4e3a1c7a822ee256f81e0d58e6b42 /tests-clar/index/tests.c
parentaa3bf89df21c44f22fe70b4aac9109646fd06b48 (diff)
Vector improvements and their fallout
Diffstat (limited to 'tests-clar/index/tests.c')
-rw-r--r--tests-clar/index/tests.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c
index 3c2a6899c..64f547ead 100644
--- a/tests-clar/index/tests.c
+++ b/tests-clar/index/tests.c
@@ -10,7 +10,7 @@ static const size_t index_entry_count_2 = 1437;
// Suite data
struct test_entry {
- int index;
+ size_t index;
char path[128];
git_off_t file_size;
git_time_t mtime;
@@ -131,8 +131,10 @@ void test_index_tests__find_in_existing(void)
cl_git_pass(git_index_open(&index, TEST_INDEX_PATH));
for (i = 0; i < ARRAY_SIZE(test_entries); ++i) {
- int idx = git_index_find(index, test_entries[i].path);
- cl_assert(idx == test_entries[i].index);
+ size_t idx;
+
+ cl_assert(!git_index_find(&idx, index, test_entries[i].path));
+ cl_assert(idx == test_entries[i].index);
}
git_index_free(index);
@@ -146,8 +148,7 @@ void test_index_tests__find_in_empty(void)
cl_git_pass(git_index_open(&index, "fake-index"));
for (i = 0; i < ARRAY_SIZE(test_entries); ++i) {
- int idx = git_index_find(index, test_entries[i].path);
- cl_assert(idx == GIT_ENOTFOUND);
+ cl_assert(GIT_ENOTFOUND == git_index_find(NULL, index, test_entries[i].path));
}
git_index_free(index);