summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-02 16:57:16 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-02 16:57:16 -0700
commitb02bcd97f80beabc96cd1f861bfc3b5f7532ef8b (patch)
treebd83ac195983092221f2606dd6dac9d11434fb11
parent17f1c9fb332d054285452313f0ec537dfde63d1c (diff)
downloadlibgit2-b02bcd97f80beabc96cd1f861bfc3b5f7532ef8b.tar.gz
Boom
-rw-r--r--tests-clar/object/raw/write.c4
-rw-r--r--tests-clar/refs/delete.c4
-rw-r--r--tests-clar/refs/pack.c4
-rw-r--r--tests-clar/refs/rename.c12
-rw-r--r--tests-clar/repo/discover.c4
5 files changed, 14 insertions, 14 deletions
diff --git a/tests-clar/object/raw/write.c b/tests-clar/object/raw/write.c
index 885d3364a..1b28d0df7 100644
--- a/tests-clar/object/raw/write.c
+++ b/tests-clar/object/raw/write.c
@@ -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)
diff --git a/tests-clar/refs/delete.c b/tests-clar/refs/delete.c
index cc3b93653..912f41456 100644
--- a/tests-clar/refs/delete.c
+++ b/tests-clar/refs/delete.c
@@ -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);
diff --git a/tests-clar/refs/pack.c b/tests-clar/refs/pack.c
index d50635670..305594c28 100644
--- a/tests-clar/refs/pack.c
+++ b/tests-clar/refs/pack.c
@@ -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);
diff --git a/tests-clar/refs/rename.c b/tests-clar/refs/rename.c
index abcc751ca..4b917ef6d 100644
--- a/tests-clar/refs/rename.c
+++ b/tests-clar/refs/rename.c
@@ -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);
diff --git a/tests-clar/repo/discover.c b/tests-clar/repo/discover.c
index 2fbd55f87..6b17d6dba 100644
--- a/tests-clar/repo/discover.c
+++ b/tests-clar/repo/discover.c
@@ -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));