Boom
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
diff --git a/tests-clar/object/raw/write.c b/tests-clar/object/raw/write.c
index 885d336..1b28d0d 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 cc3b936..912f414 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 d506356..305594c 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 abcc751..4b917ef 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 2fbd55f..6b17d6d 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));