Commit b02bcd97 by Vicent Martí

Boom

parent 17f1c9fb
......@@ -38,8 +38,8 @@ static void streaming_write(git_oid *oid, git_odb *odb, git_rawobj *raw)
static void check_object_files(object_data *d)
{
cl_git_pass(git_path_exists(d->dir));
cl_git_pass(git_path_exists(d->file));
cl_assert(git_path_exists(d->dir));
cl_assert(git_path_exists(d->file));
}
static void cmp_objects(git_rawobj *o1, git_rawobj *o2)
......
......@@ -31,7 +31,7 @@ void test_refs_delete__packed_loose(void)
/* Ensure the loose reference exists on the file system */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, packed_test_head_name));
cl_git_pass(git_path_exists(temp_path.ptr));
cl_assert(git_path_exists(temp_path.ptr));
/* Lookup the reference */
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, packed_test_head_name));
......@@ -46,7 +46,7 @@ void test_refs_delete__packed_loose(void)
cl_git_fail(git_reference_lookup(&another_looked_up_ref, g_repo, packed_test_head_name));
/* Ensure the loose reference doesn't exist any longer on the file system */
cl_git_pass(!git_path_exists(temp_path.ptr));
cl_assert(!git_path_exists(temp_path.ptr));
git_reference_free(another_looked_up_ref);
git_buf_free(&temp_path);
......
......@@ -51,7 +51,7 @@ void test_refs_pack__loose(void)
/* Ensure the packed-refs file exists */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, GIT_PACKEDREFS_FILE));
cl_git_pass(git_path_exists(temp_path.ptr));
cl_assert(git_path_exists(temp_path.ptr));
/* Ensure the known ref can still be looked up but is now packed */
cl_git_pass(git_reference_lookup(&reference, g_repo, loose_tag_ref_name));
......@@ -60,7 +60,7 @@ void test_refs_pack__loose(void)
/* Ensure the known ref has been removed from the loose folder structure */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, loose_tag_ref_name));
cl_git_pass(!git_path_exists(temp_path.ptr));
cl_assert(!git_path_exists(temp_path.ptr));
git_reference_free(reference);
git_buf_free(&temp_path);
......
......@@ -38,7 +38,7 @@ void test_refs_rename__loose(void)
/* Ensure the ref doesn't exist on the file system */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, new_name));
cl_git_pass(!git_path_exists(temp_path.ptr));
cl_assert(!git_path_exists(temp_path.ptr));
/* Retrieval of the reference to rename */
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, loose_tag_ref_name));
......@@ -63,7 +63,7 @@ void test_refs_rename__loose(void)
/* ...and the ref can be found in the file system */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, new_name));
cl_git_pass(git_path_exists(temp_path.ptr));
cl_assert(git_path_exists(temp_path.ptr));
git_reference_free(looked_up_ref);
git_reference_free(another_looked_up_ref);
......@@ -79,7 +79,7 @@ void test_refs_rename__packed(void)
/* Ensure the ref doesn't exist on the file system */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, packed_head_name));
cl_git_pass(!git_path_exists(temp_path.ptr));
cl_assert(!git_path_exists(temp_path.ptr));
/* The reference can however be looked-up... */
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, packed_head_name));
......@@ -104,7 +104,7 @@ void test_refs_rename__packed(void)
/* ...and the ref now happily lives in the file system */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, brand_new_name));
cl_git_pass(git_path_exists(temp_path.ptr));
cl_assert(git_path_exists(temp_path.ptr));
git_reference_free(looked_up_ref);
git_reference_free(another_looked_up_ref);
......@@ -120,7 +120,7 @@ void test_refs_rename__packed_doesnt_pack_others(void)
/* Ensure the other reference exists on the file system */
cl_git_pass(git_buf_joinpath(&temp_path, g_repo->path_repository, packed_test_head_name));
cl_git_pass(git_path_exists(temp_path.ptr));
cl_assert(git_path_exists(temp_path.ptr));
/* Lookup the other reference */
cl_git_pass(git_reference_lookup(&another_looked_up_ref, g_repo, packed_test_head_name));
......@@ -145,7 +145,7 @@ void test_refs_rename__packed_doesnt_pack_others(void)
cl_assert(git_reference_is_packed(another_looked_up_ref) == 0);
/* Ensure the other ref still exists on the file system */
cl_git_pass(git_path_exists(temp_path.ptr));
cl_assert(git_path_exists(temp_path.ptr));
git_reference_free(looked_up_ref);
git_reference_free(another_looked_up_ref);
......
......@@ -38,7 +38,7 @@ static void write_file(const char *path, const char *content)
git_file file;
int error;
if (git_path_exists(path) == GIT_SUCCESS) {
if (git_path_exists(path)) {
cl_git_pass(p_unlink(path));
}
......@@ -82,7 +82,7 @@ void test_repo_discover__0(void)
append_ceiling_dir(&ceiling_dirs_buf, TEMP_REPO_FOLDER);
ceiling_dirs = git_buf_cstr(&ceiling_dirs_buf);
cl_assert(git_repository_discover(repository_path, sizeof(repository_path), DISCOVER_FOLDER, 0, ceiling_dirs) == GIT_ENOTAREPO);
cl_git_fail(git_repository_discover(repository_path, sizeof(repository_path), DISCOVER_FOLDER, 0, ceiling_dirs));
cl_git_pass(git_repository_init(&repo, DISCOVER_FOLDER, 1));
cl_git_pass(git_repository_discover(repository_path, sizeof(repository_path), DISCOVER_FOLDER, 0, ceiling_dirs));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment