diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-05-18 01:21:06 +0200 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-05-18 01:26:26 +0200 |
commit | e172cf082e62aa421703080d0bccb7b8762c8bd4 (patch) | |
tree | c19f7b1be056a9176d4e865f5be5c69a5c2912c6 /tests-clar | |
parent | 2e2e97858de18abd43f7e59fcc6151510c6d3272 (diff) | |
download | libgit2-e172cf082e62aa421703080d0bccb7b8762c8bd4.tar.gz |
errors: Rename the generic return codes
Diffstat (limited to 'tests-clar')
-rw-r--r-- | tests-clar/commit/signature.c | 4 | ||||
-rw-r--r-- | tests-clar/config/multivar.c | 4 | ||||
-rw-r--r-- | tests-clar/config/write.c | 4 | ||||
-rw-r--r-- | tests-clar/core/path.c | 4 | ||||
-rw-r--r-- | tests-clar/core/vector.c | 2 | ||||
-rw-r--r-- | tests-clar/index/tests.c | 6 | ||||
-rw-r--r-- | tests-clar/network/remotelocal.c | 2 | ||||
-rw-r--r-- | tests-clar/network/remotes.c | 2 | ||||
-rw-r--r-- | tests-clar/notes/notes.c | 2 | ||||
-rw-r--r-- | tests-clar/object/lookup.c | 8 | ||||
-rw-r--r-- | tests-clar/object/tag/read.c | 4 | ||||
-rw-r--r-- | tests-clar/object/tree/frompath.c | 18 | ||||
-rw-r--r-- | tests-clar/refs/branches/delete.c | 2 | ||||
-rw-r--r-- | tests-clar/refs/branches/move.c | 2 | ||||
-rw-r--r-- | tests-clar/repo/discover.c | 10 | ||||
-rw-r--r-- | tests-clar/repo/open.c | 4 | ||||
-rw-r--r-- | tests-clar/revwalk/basic.c | 12 | ||||
-rw-r--r-- | tests-clar/revwalk/mergebase.c | 2 | ||||
-rw-r--r-- | tests-clar/status/submodules.c | 4 | ||||
-rw-r--r-- | tests-clar/status/worktree.c | 8 |
20 files changed, 52 insertions, 52 deletions
diff --git a/tests-clar/commit/signature.c b/tests-clar/commit/signature.c index 605b8330a..290b11fa3 100644 --- a/tests-clar/commit/signature.c +++ b/tests-clar/commit/signature.c @@ -3,9 +3,9 @@ static int try_build_signature(const char *name, const char *email, git_time_t time, int offset) { git_signature *sign; - int error = GIT_SUCCESS; + int error = 0; - if ((error = git_signature_new(&sign, name, email, time, offset)) < GIT_SUCCESS) + if ((error = git_signature_new(&sign, name, email, time, offset)) < 0) return error; git_signature_free((git_signature *)sign); diff --git a/tests-clar/config/multivar.c b/tests-clar/config/multivar.c index d3784c0dd..3b40cd09a 100644 --- a/tests-clar/config/multivar.c +++ b/tests-clar/config/multivar.c @@ -21,7 +21,7 @@ static int mv_read_cb(const char *name, const char *value, void *data) if (!strcmp(name, _name)) (*n)++; - return GIT_SUCCESS; + return 0; } void test_config_multivar__foreach(void) @@ -45,7 +45,7 @@ static int cb(const char *val, void *data) (*n)++; - return GIT_SUCCESS; + return 0; } void test_config_multivar__get(void) diff --git a/tests-clar/config/write.c b/tests-clar/config/write.c index f8774473e..4583a149b 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_ENOTFOUND); + cl_assert(git_config_get_int32(&i, cfg, "core.dummy") == GIT_NOTFOUND); 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_ENOTFOUND); + cl_assert(git_config_delete(cfg, "core.imaginary") == GIT_NOTFOUND); git_config_free(cfg); } diff --git a/tests-clar/core/path.c b/tests-clar/core/path.c index d826612ac..af8bf8127 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_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)); + 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)); git_buf_free(&p); } diff --git a/tests-clar/core/vector.c b/tests-clar/core/vector.c index ef3d6c36d..5b47dded2 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_EEXISTS; + return GIT_EXISTS; } static my_struct *alloc_struct(int value) diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c index 3d01b7cfb..6420163f5 100644 --- a/tests-clar/index/tests.c +++ b/tests-clar/index/tests.c @@ -50,10 +50,10 @@ static void files_are_equal(const char *a, const char *b) git_buf buf_b = GIT_BUF_INIT; int pass; - if (git_futils_readbuffer(&buf_a, a) < GIT_SUCCESS) + if (git_futils_readbuffer(&buf_a, a) < 0) cl_assert(0); - if (git_futils_readbuffer(&buf_b, b) < GIT_SUCCESS) { + if (git_futils_readbuffer(&buf_b, b) < 0) { git_buf_free(&buf_a); cl_assert(0); } @@ -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_ENOTFOUND); + cl_assert(idx == GIT_NOTFOUND); } git_index_free(index); diff --git a/tests-clar/network/remotelocal.c b/tests-clar/network/remotelocal.c index 35fa072ef..98abbbeb9 100644 --- a/tests-clar/network/remotelocal.c +++ b/tests-clar/network/remotelocal.c @@ -68,7 +68,7 @@ static int count_ref__cb(git_remote_head *head, void *payload) (void)head; (*count)++; - return GIT_SUCCESS; + return 0; } static int ensure_peeled__cb(git_remote_head *head, void *payload) diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c index 0649c86dd..17cc797d0 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_ENOTFOUND, git_remote_load(&_remote, _repo, "just-left-few-minutes-ago")); + cl_assert_equal_i(GIT_NOTFOUND, 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 5185f25ea..c23a9f0f9 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_ENOTFOUND, error); + cl_assert_equal_i(GIT_NOTFOUND, error); cl_assert_equal_i(0, retrieved_notes); } diff --git a/tests-clar/object/lookup.c b/tests-clar/object/lookup.c index 7cbcc6140..f840cb39f 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_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG)); + GIT_NOTFOUND, 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_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_ANY)); + GIT_NOTFOUND, 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_ENOTFOUND, git_object_lookup_prefix(&object, g_repo, &oid, strlen(commit), GIT_OBJ_TAG)); + GIT_NOTFOUND, 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_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG)); + GIT_NOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG)); } diff --git a/tests-clar/object/tag/read.c b/tests-clar/object/tag/read.c index cfeb3aeee..6a0ad8a23 100644 --- a/tests-clar/object/tag/read.c +++ b/tests-clar/object/tag/read.c @@ -17,9 +17,9 @@ static void ensure_tag_pattern_match(git_repository *repo, const size_t expected_matches) { git_strarray tag_list; - int error = GIT_SUCCESS; + int error = 0; - if ((error = git_tag_list_match(&tag_list, pattern, repo)) < GIT_SUCCESS) + if ((error = git_tag_list_match(&tag_list, pattern, repo)) < 0) goto exit; if (tag_list.count != expected_matches) diff --git a/tests-clar/object/tree/frompath.c b/tests-clar/object/tree/frompath.c index ea0add37b..7d4adafb2 100644 --- a/tests-clar/object/tree/frompath.c +++ b/tests-clar/object/tree/frompath.c @@ -30,10 +30,10 @@ static void assert_tree_from_path(git_tree *root, const char *path, int expected cl_assert(git_tree_get_subtree(&containing_tree, root, path) == expected_result); - if (containing_tree == NULL && expected_result != GIT_SUCCESS) + if (containing_tree == NULL && expected_result != 0) return; - cl_assert(containing_tree != NULL && expected_result == GIT_SUCCESS); + cl_assert(containing_tree != NULL && expected_result == 0); cl_git_pass(git_oid_streq(git_object_id((const git_object *)containing_tree), expected_raw_oid)); @@ -49,25 +49,25 @@ static void assert_tree_from_path_klass(git_tree *root, const char *path, int ex void test_object_tree_frompath__retrieve_tree_from_path_to_treeentry(void) { /* Will return self if given a one path segment... */ - assert_tree_from_path(tree, "README", GIT_SUCCESS, tree_with_subtrees_oid); + assert_tree_from_path(tree, "README", 0, tree_with_subtrees_oid); /* ...even one that lead to a non existent tree entry. */ - assert_tree_from_path(tree, "i-do-not-exist.txt", GIT_SUCCESS, tree_with_subtrees_oid); + assert_tree_from_path(tree, "i-do-not-exist.txt", 0, tree_with_subtrees_oid); /* Will return fgh tree oid given this following path... */ - assert_tree_from_path(tree, "ab/de/fgh/1.txt", GIT_SUCCESS, "3259a6bd5b57fb9c1281bb7ed3167b50f224cb54"); + assert_tree_from_path(tree, "ab/de/fgh/1.txt", 0, "3259a6bd5b57fb9c1281bb7ed3167b50f224cb54"); /* ... and ab tree oid given this one. */ - assert_tree_from_path(tree, "ab/de", GIT_SUCCESS, "f1425cef211cc08caa31e7b545ffb232acb098c3"); + assert_tree_from_path(tree, "ab/de", 0, "f1425cef211cc08caa31e7b545ffb232acb098c3"); /* Will succeed if given a valid path which leads to a tree entry which doesn't exist */ - assert_tree_from_path(tree, "ab/de/fgh/i-do-not-exist.txt", GIT_SUCCESS, "3259a6bd5b57fb9c1281bb7ed3167b50f224cb54"); + assert_tree_from_path(tree, "ab/de/fgh/i-do-not-exist.txt", 0, "3259a6bd5b57fb9c1281bb7ed3167b50f224cb54"); } void test_object_tree_frompath__fail_when_processing_an_unknown_tree_segment(void) { - 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); + 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); } 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 03d3c56d7..629c491f3 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_ENOTFOUND, error); + cl_assert_equal_i(GIT_NOTFOUND, 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 242e5cd01..8948497e2 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_ENOTFOUND, error); + cl_assert_equal_i(GIT_NOTFOUND, error); } diff --git a/tests-clar/repo/discover.c b/tests-clar/repo/discover.c index b3d639bd1..635bf9661 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_ENOTFOUND, git_repository_discover(repository_path, sizeof(repository_path), DISCOVER_FOLDER, 0, ceiling_dirs)); + cl_assert_equal_i(GIT_NOTFOUND, 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_ENOTFOUND, git_repository_discover(found_path, sizeof(found_path), ALTERNATE_NOT_FOUND_FOLDER, 0, ceiling_dirs)); + cl_assert_equal_i(GIT_NOTFOUND, 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_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)); + 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)); //.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 292466390..62578bec3 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_ENOTFOUND, git_repository_open(&repo, "i-do-not/exist")); -}
\ No newline at end of file + cl_assert_equal_i(GIT_NOTFOUND, git_repository_open(&repo, "i-do-not/exist")); +} diff --git a/tests-clar/revwalk/basic.c b/tests-clar/revwalk/basic.c index 7d54ce990..a5a9b2eda 100644 --- a/tests-clar/revwalk/basic.c +++ b/tests-clar/revwalk/basic.c @@ -73,7 +73,7 @@ static int test_walk(git_revwalk *walk, const git_oid *root, i = 0; - while (git_revwalk_next(&oid, walk) == GIT_SUCCESS) { + while (git_revwalk_next(&oid, walk) == 0) { result_array[i++] = get_commit_index(&oid); /*{ char str[41]; @@ -86,7 +86,7 @@ static int test_walk(git_revwalk *walk, const git_oid *root, for (i = 0; i < results_count; ++i) if (memcmp(possible_results[i], result_array, result_bytes) == 0) - return GIT_SUCCESS; + return 0; return GIT_ERROR; } @@ -125,7 +125,7 @@ void test_revwalk_basic__glob_heads(void) cl_git_pass(git_revwalk_push_glob(_walk, "heads")); - while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) { + while (git_revwalk_next(&oid, _walk) == 0) { i++; } @@ -140,7 +140,7 @@ void test_revwalk_basic__push_head(void) cl_git_pass(git_revwalk_push_head(_walk)); - while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) { + while (git_revwalk_next(&oid, _walk) == 0) { i++; } @@ -156,7 +156,7 @@ void test_revwalk_basic__push_head_hide_ref(void) cl_git_pass(git_revwalk_push_head(_walk)); cl_git_pass(git_revwalk_hide_ref(_walk, "refs/heads/packed-test")); - while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) { + while (git_revwalk_next(&oid, _walk) == 0) { i++; } @@ -172,7 +172,7 @@ void test_revwalk_basic__push_head_hide_ref_nobase(void) cl_git_pass(git_revwalk_push_head(_walk)); cl_git_pass(git_revwalk_hide_ref(_walk, "refs/heads/packed")); - while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) { + while (git_revwalk_next(&oid, _walk) == 0) { i++; } diff --git a/tests-clar/revwalk/mergebase.c b/tests-clar/revwalk/mergebase.c index e807e3ad2..694dffcba 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_ENOTFOUND, error); + cl_assert_equal_i(GIT_NOTFOUND, error); } /* diff --git a/tests-clar/status/submodules.c b/tests-clar/status/submodules.c index 9423e8490..63a44dc0e 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_ENOTFOUND); + cl_assert(git_submodule_lookup(NULL, g_repo, "nonexistent") == GIT_NOTFOUND); - cl_assert(git_submodule_lookup(NULL, g_repo, "modified") == GIT_ENOTFOUND); + cl_assert(git_submodule_lookup(NULL, g_repo, "modified") == GIT_NOTFOUND); 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 6cc6259b8..d839e8462 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_ENOTFOUND); + cl_assert(error == GIT_NOTFOUND); } /* 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_ENOTFOUND); + cl_assert(error == GIT_NOTFOUND); } /* 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_ENOTFOUND); + cl_assert(error != GIT_NOTFOUND); } @@ -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_ENOTFOUND); + cl_assert(error != GIT_NOTFOUND); git_repository_free(repo); } |