diff options
| author | Philip Kelley <phkelley@hotmail.com> | 2013-01-27 14:17:07 -0500 |
|---|---|---|
| committer | Philip Kelley <phkelley@hotmail.com> | 2013-01-27 14:17:07 -0500 |
| commit | 11d9f6b30438a141def883b0115f7f764c03e990 (patch) | |
| tree | abe54e8085c4e3a1c7a822ee256f81e0d58e6b42 /tests-clar/index/tests.c | |
| parent | aa3bf89df21c44f22fe70b4aac9109646fd06b48 (diff) | |
| download | libgit2-11d9f6b30438a141def883b0115f7f764c03e990.tar.gz | |
Vector improvements and their fallout
Diffstat (limited to 'tests-clar/index/tests.c')
| -rw-r--r-- | tests-clar/index/tests.c | 11 |
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); |
