summaryrefslogtreecommitdiff
path: root/tests/odb/backend
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-11-28 14:26:57 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-12-01 11:54:57 +0000
commit168fe39bea3368972a8b1a33d5908e73bc790c18 (patch)
treec6d07340e2d8d2d66091c44c7763f3e1823acca2 /tests/odb/backend
parent18e71e6d597abe6c7feb666429c921bd19dc0ba8 (diff)
downloadlibgit2-168fe39bea3368972a8b1a33d5908e73bc790c18.tar.gz
object_type: use new enumeration namesethomson/index_fixes
Use the new object_type enumeration names within the codebase.
Diffstat (limited to 'tests/odb/backend')
-rw-r--r--tests/odb/backend/backend_helpers.c12
-rw-r--r--tests/odb/backend/mempack.c4
-rw-r--r--tests/odb/backend/nobackend.c2
-rw-r--r--tests/odb/backend/nonrefreshing.c12
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/odb/backend/backend_helpers.c b/tests/odb/backend/backend_helpers.c
index 37a8fd200..c0f4103f1 100644
--- a/tests/odb/backend/backend_helpers.c
+++ b/tests/odb/backend/backend_helpers.c
@@ -58,7 +58,7 @@ static int fake_backend__exists_prefix(
}
static int fake_backend__read(
- void **buffer_p, size_t *len_p, git_otype *type_p,
+ void **buffer_p, size_t *len_p, git_object_t *type_p,
git_odb_backend *backend, const git_oid *oid)
{
const fake_object *obj;
@@ -74,13 +74,13 @@ static int fake_backend__read(
*len_p = strlen(obj->content);
*buffer_p = git__strdup(obj->content);
- *type_p = GIT_OBJ_BLOB;
+ *type_p = GIT_OBJECT_BLOB;
return 0;
}
static int fake_backend__read_header(
- size_t *len_p, git_otype *type_p,
+ size_t *len_p, git_object_t *type_p,
git_odb_backend *backend, const git_oid *oid)
{
const fake_object *obj;
@@ -95,13 +95,13 @@ static int fake_backend__read_header(
return error;
*len_p = strlen(obj->content);
- *type_p = GIT_OBJ_BLOB;
+ *type_p = GIT_OBJECT_BLOB;
return 0;
}
static int fake_backend__read_prefix(
- git_oid *out_oid, void **buffer_p, size_t *len_p, git_otype *type_p,
+ git_oid *out_oid, void **buffer_p, size_t *len_p, git_object_t *type_p,
git_odb_backend *backend, const git_oid *short_oid, size_t len)
{
const fake_object *obj;
@@ -118,7 +118,7 @@ static int fake_backend__read_prefix(
git_oid_fromstr(out_oid, obj->oid);
*len_p = strlen(obj->content);
*buffer_p = git__strdup(obj->content);
- *type_p = GIT_OBJ_BLOB;
+ *type_p = GIT_OBJECT_BLOB;
return 0;
}
diff --git a/tests/odb/backend/mempack.c b/tests/odb/backend/mempack.c
index 624f0e604..55cd69f80 100644
--- a/tests/odb/backend/mempack.c
+++ b/tests/odb/backend/mempack.c
@@ -28,7 +28,7 @@ void test_odb_backend_mempack__cleanup(void)
void test_odb_backend_mempack__write_succeeds(void)
{
const char *data = "data";
- cl_git_pass(git_odb_write(&_oid, _odb, data, strlen(data) + 1, GIT_OBJ_BLOB));
+ cl_git_pass(git_odb_write(&_oid, _odb, data, strlen(data) + 1, GIT_OBJECT_BLOB));
cl_git_pass(git_odb_read(&_obj, _odb, &_oid));
}
@@ -47,7 +47,7 @@ void test_odb_backend_mempack__exists_of_missing_object_fails(void)
void test_odb_backend_mempack__exists_with_existing_objects_succeeds(void)
{
const char *data = "data";
- cl_git_pass(git_odb_write(&_oid, _odb, data, strlen(data) + 1, GIT_OBJ_BLOB));
+ cl_git_pass(git_odb_write(&_oid, _odb, data, strlen(data) + 1, GIT_OBJECT_BLOB));
cl_assert(git_odb_exists(_odb, &_oid) == 1);
}
diff --git a/tests/odb/backend/nobackend.c b/tests/odb/backend/nobackend.c
index 3c4f344b1..cd727b7c4 100644
--- a/tests/odb/backend/nobackend.c
+++ b/tests/odb/backend/nobackend.c
@@ -37,7 +37,7 @@ void test_odb_backend_nobackend__write_fails_gracefully(void)
const git_error *err;
git_repository_odb(&odb, _repo);
- cl_git_fail(git_odb_write(&id, odb, "Hello world!\n", 13, GIT_OBJ_BLOB));
+ cl_git_fail(git_odb_write(&id, odb, "Hello world!\n", 13, GIT_OBJECT_BLOB));
err = giterr_last();
cl_assert_equal_s(err->message, "cannot write object - unsupported in the loaded odb backends");
diff --git a/tests/odb/backend/nonrefreshing.c b/tests/odb/backend/nonrefreshing.c
index 6abc0c6d2..ede48ade6 100644
--- a/tests/odb/backend/nonrefreshing.c
+++ b/tests/odb/backend/nonrefreshing.c
@@ -58,7 +58,7 @@ void test_odb_backend_nonrefreshing__read_is_invoked_once_on_failure(void)
git_object *obj;
cl_git_fail_with(
- git_object_lookup(&obj, _repo, &_nonexisting_oid, GIT_OBJ_ANY),
+ git_object_lookup(&obj, _repo, &_nonexisting_oid, GIT_OBJECT_ANY),
GIT_ENOTFOUND);
cl_assert_equal_i(1, _fake->read_calls);
@@ -69,7 +69,7 @@ void test_odb_backend_nonrefreshing__readprefix_is_invoked_once_on_failure(void)
git_object *obj;
cl_git_fail_with(
- git_object_lookup_prefix(&obj, _repo, &_nonexisting_oid, 7, GIT_OBJ_ANY),
+ git_object_lookup_prefix(&obj, _repo, &_nonexisting_oid, 7, GIT_OBJECT_ANY),
GIT_ENOTFOUND);
cl_assert_equal_i(1, _fake->read_prefix_calls);
@@ -79,7 +79,7 @@ void test_odb_backend_nonrefreshing__readheader_is_invoked_once_on_failure(void)
{
git_odb *odb;
size_t len;
- git_otype type;
+ git_object_t type;
cl_git_pass(git_repository_odb__weakptr(&odb, _repo));
@@ -104,7 +104,7 @@ void test_odb_backend_nonrefreshing__read_is_invoked_once_on_success(void)
{
git_object *obj;
- cl_git_pass(git_object_lookup(&obj, _repo, &_existing_oid, GIT_OBJ_ANY));
+ cl_git_pass(git_object_lookup(&obj, _repo, &_existing_oid, GIT_OBJECT_ANY));
cl_assert_equal_i(1, _fake->read_calls);
@@ -115,7 +115,7 @@ void test_odb_backend_nonrefreshing__readprefix_is_invoked_once_on_success(void)
{
git_object *obj;
- cl_git_pass(git_object_lookup_prefix(&obj, _repo, &_existing_oid, 7, GIT_OBJ_ANY));
+ cl_git_pass(git_object_lookup_prefix(&obj, _repo, &_existing_oid, 7, GIT_OBJECT_ANY));
cl_assert_equal_i(1, _fake->read_prefix_calls);
@@ -126,7 +126,7 @@ void test_odb_backend_nonrefreshing__readheader_is_invoked_once_on_success(void)
{
git_odb *odb;
size_t len;
- git_otype type;
+ git_object_t type;
cl_git_pass(git_repository_odb__weakptr(&odb, _repo));