]>
Commit | Line | Data |
---|---|---|
69c068c7 | 1 | #include "clar_libgit2.h" |
2 | ||
3 | void test_index_inmemory__can_create_an_inmemory_index(void) | |
4 | { | |
5 | git_index *index; | |
6 | ||
7 | cl_git_pass(git_index_new(&index)); | |
a8122b5d | 8 | cl_assert_equal_i(0, (int)git_index_entrycount(index)); |
69c068c7 | 9 | |
10 | git_index_free(index); | |
11 | } | |
33f95a9b | 12 | |
25743bd7 | 13 | void test_index_inmemory__cannot_add_bypath_to_an_inmemory_index(void) |
33f95a9b | 14 | { |
15 | git_index *index; | |
16 | ||
17 | cl_git_pass(git_index_new(&index)); | |
18 | ||
25743bd7 | 19 | cl_assert_equal_i(GIT_ERROR, git_index_add_bypath(index, "test.txt")); |
33f95a9b | 20 | |
21 | git_index_free(index); | |
22 | } |