summaryrefslogtreecommitdiff
path: root/tests/t0601-read.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-11-02 18:42:42 +0200
committerVicent Marti <tanoku@gmail.com>2010-11-02 18:42:42 +0200
commit6fd195d76c7f52baae5540e287affe2259900d36 (patch)
tree4dd644c5086dce17827f42b8c811049175da88f9 /tests/t0601-read.c
parentd80e9d55aa2d0629f7f207db42762494075d7854 (diff)
downloadlibgit2-6fd195d76c7f52baae5540e287affe2259900d36.tar.gz
Change git_repository initialization to use a path
The constructor to git_repository is now called 'git_repository_open(path)' and takes a path to a git repository instead of an existing ODB object. Unit tests have been updated accordingly and the two test repositories have been merged into one. Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests/t0601-read.c')
-rw-r--r--tests/t0601-read.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/t0601-read.c b/tests/t0601-read.c
index 4c31be9c3..345e5b534 100644
--- a/tests/t0601-read.c
+++ b/tests/t0601-read.c
@@ -5,7 +5,7 @@
#include <git/odb.h>
#include <git/index.h>
-#define TEST_INDEX_PATH "../resources/index"
+#define TEST_INDEX_PATH "../resources/testrepo.git/index"
#define TEST_INDEX2_PATH "../resources/gitgit.index"
#define TEST_INDEX_ENTRY_COUNT 109
@@ -29,7 +29,7 @@ struct test_entry TEST_ENTRIES[] = {
BEGIN_TEST(index_loadempty_test)
git_index *index;
- index = git_index_alloc("in-memory-index");
+ index = git_index_alloc("in-memory-index", NULL);
must_be_true(index != NULL);
must_be_true(index->on_disk == 0);
@@ -46,7 +46,7 @@ BEGIN_TEST(index_load_test)
git_index *index;
unsigned int i;
- index = git_index_alloc(TEST_INDEX_PATH);
+ index = git_index_alloc(TEST_INDEX_PATH, NULL);
must_be_true(index != NULL);
must_be_true(index->on_disk);
@@ -70,7 +70,7 @@ END_TEST
BEGIN_TEST(index2_load_test)
git_index *index;
- index = git_index_alloc(TEST_INDEX2_PATH);
+ index = git_index_alloc(TEST_INDEX2_PATH, NULL);
must_be_true(index != NULL);
must_be_true(index->on_disk);
@@ -88,7 +88,7 @@ BEGIN_TEST(index_find_test)
git_index *index;
unsigned int i;
- index = git_index_alloc(TEST_INDEX_PATH);
+ index = git_index_alloc(TEST_INDEX_PATH, NULL);
must_be_true(index != NULL);
must_pass(git_index_read(index));
@@ -104,7 +104,7 @@ BEGIN_TEST(index_findempty_test)
git_index *index;
unsigned int i;
- index = git_index_alloc("fake-index");
+ index = git_index_alloc("fake-index", NULL);
must_be_true(index != NULL);
for (i = 0; i < ARRAY_SIZE(TEST_ENTRIES); ++i) {