summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/config/write.c4
-rw-r--r--tests-clar/core/path.c4
-rw-r--r--tests-clar/core/vector.c2
-rw-r--r--tests-clar/index/tests.c2
-rw-r--r--tests-clar/network/remotes.c2
-rw-r--r--tests-clar/notes/notes.c2
-rw-r--r--tests-clar/object/lookup.c8
-rw-r--r--tests-clar/object/tree/frompath.c4
-rw-r--r--tests-clar/refs/branches/delete.c2
-rw-r--r--tests-clar/refs/branches/move.c2
-rw-r--r--tests-clar/repo/discover.c10
-rw-r--r--tests-clar/repo/open.c2
-rw-r--r--tests-clar/revwalk/mergebase.c2
-rw-r--r--tests-clar/status/submodules.c4
-rw-r--r--tests-clar/status/worktree.c8
15 files changed, 29 insertions, 29 deletions
diff --git a/tests-clar/config/write.c b/tests-clar/config/write.c
index 4583a149b..f8774473e 100644
--- a/tests-clar/config/write.c
+++ b/tests-clar/config/write.c
@@ -62,7 +62,7 @@ void test_config_write__delete_value(void)
git_config_free(cfg);
cl_git_pass(git_config_open_ondisk(&cfg, "config9"));
- cl_assert(git_config_get_int32(&i, cfg, "core.dummy") == GIT_NOTFOUND);
+ cl_assert(git_config_get_int32(&i, cfg, "core.dummy") == GIT_ENOTFOUND);
cl_git_pass(git_config_set_int32(cfg, "core.dummy", 1));
git_config_free(cfg);
}
@@ -87,6 +87,6 @@ void test_config_write__delete_inexistent(void)
git_config *cfg;
cl_git_pass(git_config_open_ondisk(&cfg, "config9"));
- cl_assert(git_config_delete(cfg, "core.imaginary") == GIT_NOTFOUND);
+ cl_assert(git_config_delete(cfg, "core.imaginary") == GIT_ENOTFOUND);
git_config_free(cfg);
}
diff --git a/tests-clar/core/path.c b/tests-clar/core/path.c
index af8bf8127..d826612ac 100644
--- a/tests-clar/core/path.c
+++ b/tests-clar/core/path.c
@@ -413,8 +413,8 @@ void test_core_path__13_cannot_prettify_a_non_existing_file(void)
git_buf p = GIT_BUF_INIT;
cl_must_pass(git_path_exists(NON_EXISTING_FILEPATH) == false);
- cl_assert_equal_i(GIT_NOTFOUND, git_path_prettify(&p, NON_EXISTING_FILEPATH, NULL));
- cl_assert_equal_i(GIT_NOTFOUND, git_path_prettify(&p, NON_EXISTING_FILEPATH "/so-do-i", NULL));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_path_prettify(&p, NON_EXISTING_FILEPATH, NULL));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_path_prettify(&p, NON_EXISTING_FILEPATH "/so-do-i", NULL));
git_buf_free(&p);
}
diff --git a/tests-clar/core/vector.c b/tests-clar/core/vector.c
index 5b47dded2..ef3d6c36d 100644
--- a/tests-clar/core/vector.c
+++ b/tests-clar/core/vector.c
@@ -143,7 +143,7 @@ static int merge_structs(void **old_raw, void *new)
((my_struct *)old)->count += 1;
git__free(new);
_struct_count--;
- return GIT_EXISTS;
+ return GIT_EEXISTS;
}
static my_struct *alloc_struct(int value)
diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c
index 6420163f5..3436f8d1e 100644
--- a/tests-clar/index/tests.c
+++ b/tests-clar/index/tests.c
@@ -153,7 +153,7 @@ void test_index_tests__find_in_empty(void)
for (i = 0; i < ARRAY_SIZE(test_entries); ++i) {
int idx = git_index_find(index, test_entries[i].path);
- cl_assert(idx == GIT_NOTFOUND);
+ cl_assert(idx == GIT_ENOTFOUND);
}
git_index_free(index);
diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c
index 17cc797d0..0649c86dd 100644
--- a/tests-clar/network/remotes.c
+++ b/tests-clar/network/remotes.c
@@ -156,7 +156,7 @@ void test_network_remotes__list(void)
void test_network_remotes__loading_a_missing_remote_returns_ENOTFOUND(void)
{
- cl_assert_equal_i(GIT_NOTFOUND, git_remote_load(&_remote, _repo, "just-left-few-minutes-ago"));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_remote_load(&_remote, _repo, "just-left-few-minutes-ago"));
}
void test_network_remotes__add(void)
diff --git a/tests-clar/notes/notes.c b/tests-clar/notes/notes.c
index c23a9f0f9..5185f25ea 100644
--- a/tests-clar/notes/notes.c
+++ b/tests-clar/notes/notes.c
@@ -127,7 +127,7 @@ void test_notes_notes__retrieving_a_list_of_notes_for_an_unknown_namespace_retur
error = git_note_foreach(_repo, "refs/notes/i-am-not", note_list_cb, &retrieved_notes);
cl_git_fail(error);
- cl_assert_equal_i(GIT_NOTFOUND, error);
+ cl_assert_equal_i(GIT_ENOTFOUND, error);
cl_assert_equal_i(0, retrieved_notes);
}
diff --git a/tests-clar/object/lookup.c b/tests-clar/object/lookup.c
index f840cb39f..7cbcc6140 100644
--- a/tests-clar/object/lookup.c
+++ b/tests-clar/object/lookup.c
@@ -22,7 +22,7 @@ void test_object_lookup__lookup_wrong_type_returns_enotfound(void)
cl_git_pass(git_oid_fromstr(&oid, commit));
cl_assert_equal_i(
- GIT_NOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG));
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG));
}
void test_object_lookup__lookup_nonexisting_returns_enotfound(void)
@@ -33,7 +33,7 @@ void test_object_lookup__lookup_nonexisting_returns_enotfound(void)
cl_git_pass(git_oid_fromstr(&oid, unknown));
cl_assert_equal_i(
- GIT_NOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_ANY));
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_ANY));
}
void test_object_lookup__lookup_wrong_type_by_abbreviated_id_returns_enotfound(void)
@@ -44,7 +44,7 @@ void test_object_lookup__lookup_wrong_type_by_abbreviated_id_returns_enotfound(v
cl_git_pass(git_oid_fromstrn(&oid, commit, strlen(commit)));
cl_assert_equal_i(
- GIT_NOTFOUND, git_object_lookup_prefix(&object, g_repo, &oid, strlen(commit), GIT_OBJ_TAG));
+ GIT_ENOTFOUND, git_object_lookup_prefix(&object, g_repo, &oid, strlen(commit), GIT_OBJ_TAG));
}
void test_object_lookup__lookup_wrong_type_eventually_returns_enotfound(void)
@@ -59,5 +59,5 @@ void test_object_lookup__lookup_wrong_type_eventually_returns_enotfound(void)
git_object_free(object);
cl_assert_equal_i(
- GIT_NOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG));
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG));
}
diff --git a/tests-clar/object/tree/frompath.c b/tests-clar/object/tree/frompath.c
index 7d4adafb2..06c69ac08 100644
--- a/tests-clar/object/tree/frompath.c
+++ b/tests-clar/object/tree/frompath.c
@@ -66,8 +66,8 @@ void test_object_tree_frompath__retrieve_tree_from_path_to_treeentry(void)
void test_object_tree_frompath__fail_when_processing_an_unknown_tree_segment(void)
{
- assert_tree_from_path(tree, "nope/de/fgh/1.txt", GIT_NOTFOUND, NULL);
- assert_tree_from_path(tree, "ab/me-neither/fgh/2.txt", GIT_NOTFOUND, NULL);
+ assert_tree_from_path(tree, "nope/de/fgh/1.txt", GIT_ENOTFOUND, NULL);
+ assert_tree_from_path(tree, "ab/me-neither/fgh/2.txt", GIT_ENOTFOUND, NULL);
}
void test_object_tree_frompath__fail_when_processing_an_invalid_path(void)
diff --git a/tests-clar/refs/branches/delete.c b/tests-clar/refs/branches/delete.c
index 629c491f3..03d3c56d7 100644
--- a/tests-clar/refs/branches/delete.c
+++ b/tests-clar/refs/branches/delete.c
@@ -81,7 +81,7 @@ static void assert_non_exisitng_branch_removal(const char *branch_name, git_bran
error = git_branch_delete(repo, branch_name, branch_type);
cl_git_fail(error);
- cl_assert_equal_i(GIT_NOTFOUND, error);
+ cl_assert_equal_i(GIT_ENOTFOUND, error);
}
void test_refs_branches_delete__deleting_a_non_existing_branch_returns_ENOTFOUND(void)
diff --git a/tests-clar/refs/branches/move.c b/tests-clar/refs/branches/move.c
index 8948497e2..242e5cd01 100644
--- a/tests-clar/refs/branches/move.c
+++ b/tests-clar/refs/branches/move.c
@@ -68,5 +68,5 @@ void test_refs_branches_move__moving_a_non_exisiting_branch_returns_ENOTFOUND(vo
error = git_branch_move(repo, "where/am/I", NEW_BRANCH_NAME, 0);
cl_git_fail(error);
- cl_assert_equal_i(GIT_NOTFOUND, error);
+ cl_assert_equal_i(GIT_ENOTFOUND, error);
}
diff --git a/tests-clar/repo/discover.c b/tests-clar/repo/discover.c
index 635bf9661..b3d639bd1 100644
--- a/tests-clar/repo/discover.c
+++ b/tests-clar/repo/discover.c
@@ -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_equal_i(GIT_NOTFOUND, git_repository_discover(repository_path, sizeof(repository_path), DISCOVER_FOLDER, 0, ceiling_dirs));
+ cl_assert_equal_i(GIT_ENOTFOUND, 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));
@@ -117,7 +117,7 @@ void test_repo_discover__0(void)
cl_git_fail(git_repository_discover(found_path, sizeof(found_path), ALTERNATE_MALFORMED_FOLDER1, 0, ceiling_dirs));
cl_git_fail(git_repository_discover(found_path, sizeof(found_path), ALTERNATE_MALFORMED_FOLDER2, 0, ceiling_dirs));
cl_git_fail(git_repository_discover(found_path, sizeof(found_path), ALTERNATE_MALFORMED_FOLDER3, 0, ceiling_dirs));
- cl_assert_equal_i(GIT_NOTFOUND, git_repository_discover(found_path, sizeof(found_path), ALTERNATE_NOT_FOUND_FOLDER, 0, ceiling_dirs));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_repository_discover(found_path, sizeof(found_path), ALTERNATE_NOT_FOUND_FOLDER, 0, ceiling_dirs));
append_ceiling_dir(&ceiling_dirs_buf, SUB_REPOSITORY_FOLDER);
ceiling_dirs = git_buf_cstr(&ceiling_dirs_buf);
@@ -125,9 +125,9 @@ void test_repo_discover__0(void)
//this must pass as ceiling_directories cannot predent the current
//working directory to be checked
cl_git_pass(git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER, 0, ceiling_dirs));
- cl_assert_equal_i(GIT_NOTFOUND, git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER_SUB, 0, ceiling_dirs));
- cl_assert_equal_i(GIT_NOTFOUND, git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER_SUB_SUB, 0, ceiling_dirs));
- cl_assert_equal_i(GIT_NOTFOUND, git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER_SUB_SUB_SUB, 0, ceiling_dirs));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER_SUB, 0, ceiling_dirs));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER_SUB_SUB, 0, ceiling_dirs));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_repository_discover(found_path, sizeof(found_path), SUB_REPOSITORY_FOLDER_SUB_SUB_SUB, 0, ceiling_dirs));
//.gitfile redirection should not be affected by ceiling directories
ensure_repository_discover(REPOSITORY_ALTERNATE_FOLDER, ceiling_dirs, sub_repository_path);
diff --git a/tests-clar/repo/open.c b/tests-clar/repo/open.c
index 62578bec3..c70ec83a9 100644
--- a/tests-clar/repo/open.c
+++ b/tests-clar/repo/open.c
@@ -278,5 +278,5 @@ void test_repo_open__win32_path(void)
void test_repo_open__opening_a_non_existing_repository_returns_ENOTFOUND(void)
{
git_repository *repo;
- cl_assert_equal_i(GIT_NOTFOUND, git_repository_open(&repo, "i-do-not/exist"));
+ cl_assert_equal_i(GIT_ENOTFOUND, git_repository_open(&repo, "i-do-not/exist"));
}
diff --git a/tests-clar/revwalk/mergebase.c b/tests-clar/revwalk/mergebase.c
index 694dffcba..e807e3ad2 100644
--- a/tests-clar/revwalk/mergebase.c
+++ b/tests-clar/revwalk/mergebase.c
@@ -63,7 +63,7 @@ void test_revwalk_mergebase__no_common_ancestor_returns_ENOTFOUND(void)
error = git_merge_base(&result, _repo, &one, &two);
cl_git_fail(error);
- cl_assert_equal_i(GIT_NOTFOUND, error);
+ cl_assert_equal_i(GIT_ENOTFOUND, error);
}
/*
diff --git a/tests-clar/status/submodules.c b/tests-clar/status/submodules.c
index 63a44dc0e..9423e8490 100644
--- a/tests-clar/status/submodules.c
+++ b/tests-clar/status/submodules.c
@@ -34,9 +34,9 @@ void test_status_submodules__api(void)
{
git_submodule *sm;
- cl_assert(git_submodule_lookup(NULL, g_repo, "nonexistent") == GIT_NOTFOUND);
+ cl_assert(git_submodule_lookup(NULL, g_repo, "nonexistent") == GIT_ENOTFOUND);
- cl_assert(git_submodule_lookup(NULL, g_repo, "modified") == GIT_NOTFOUND);
+ cl_assert(git_submodule_lookup(NULL, g_repo, "modified") == GIT_ENOTFOUND);
cl_git_pass(git_submodule_lookup(&sm, g_repo, "testrepo"));
cl_assert(sm != NULL);
diff --git a/tests-clar/status/worktree.c b/tests-clar/status/worktree.c
index d839e8462..6cc6259b8 100644
--- a/tests-clar/status/worktree.c
+++ b/tests-clar/status/worktree.c
@@ -199,7 +199,7 @@ void test_status_worktree__single_nonexistent_file(void)
error = git_status_file(&status_flags, repo, "nonexistent");
cl_git_fail(error);
- cl_assert(error == GIT_NOTFOUND);
+ cl_assert(error == GIT_ENOTFOUND);
}
/* this test is equivalent to t18-status.c:singlestatus2 */
@@ -211,7 +211,7 @@ void test_status_worktree__single_nonexistent_file_empty_repo(void)
error = git_status_file(&status_flags, repo, "nonexistent");
cl_git_fail(error);
- cl_assert(error == GIT_NOTFOUND);
+ cl_assert(error == GIT_ENOTFOUND);
}
/* this test is equivalent to t18-status.c:singlestatus3 */
@@ -235,7 +235,7 @@ void test_status_worktree__single_folder(void)
error = git_status_file(&status_flags, repo, "subdir");
cl_git_fail(error);
- cl_assert(error != GIT_NOTFOUND);
+ cl_assert(error != GIT_ENOTFOUND);
}
@@ -416,7 +416,7 @@ void test_status_worktree__cannot_retrieve_the_status_of_a_bare_repository(void)
error = git_status_file(&status, repo, "dummy");
cl_git_fail(error);
- cl_assert(error != GIT_NOTFOUND);
+ cl_assert(error != GIT_ENOTFOUND);
git_repository_free(repo);
}