Skip to content

Commit

Permalink
Boom
Browse files Browse the repository at this point in the history
  • Loading branch information
vmg committed May 2, 2012
1 parent 17f1c9f commit b02bcd9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions tests-clar/object/raw/write.c
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests-clar/refs/delete.c
Expand Up @@ -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));
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests-clar/refs/pack.c
Expand Up @@ -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));
Expand All @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions tests-clar/refs/rename.c
Expand Up @@ -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));
Expand All @@ -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);
Expand All @@ -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));
Expand All @@ -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);
Expand All @@ -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));
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests-clar/repo/discover.c
Expand Up @@ -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));
}

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit b02bcd9

Please sign in to comment.