summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-16 15:56:01 -0700
committerRussell Belfer <arrbee@arrbee.com>2012-03-16 15:56:01 -0700
commit0d0fa7c3681e4ef3d0452666a9bc97d4b08391c9 (patch)
tree5e03e03bf9dc2f6125f4fb450cd3239d882b824f /tests-clar
parent4cfe2ab60b1e26554b2bf753b06f538cb3475bd0 (diff)
downloadlibgit2-0d0fa7c3681e4ef3d0452666a9bc97d4b08391c9.tar.gz
Convert attr, ignore, mwindow, status to new errors
Also cleaned up some previously converted code that still had little things to polish.
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/attr/repo.c8
-rw-r--r--tests-clar/core/path.c2
-rw-r--r--tests-clar/object/tree/diff.c4
-rw-r--r--tests-clar/status/ignore.c4
-rw-r--r--tests-clar/status/worktree.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/tests-clar/attr/repo.c b/tests-clar/attr/repo.c
index 4de4afaa..5ff33d14 100644
--- a/tests-clar/attr/repo.c
+++ b/tests-clar/attr/repo.c
@@ -72,9 +72,9 @@ void test_attr_repo__get_one(void)
attr_check_expected(scan->expected, scan->expected_str, value);
}
- cl_git_pass(git_attr_cache__is_cached(g_repo, ".git/info/attributes"));
- cl_git_pass(git_attr_cache__is_cached(g_repo, ".gitattributes"));
- cl_git_pass(git_attr_cache__is_cached(g_repo, "sub/.gitattributes"));
+ cl_assert(git_attr_cache__is_cached(g_repo, ".git/info/attributes"));
+ cl_assert(git_attr_cache__is_cached(g_repo, ".gitattributes"));
+ cl_assert(git_attr_cache__is_cached(g_repo, "sub/.gitattributes"));
}
void test_attr_repo__get_many(void)
@@ -114,7 +114,7 @@ static int count_attrs(
*((int *)payload) += 1;
- return GIT_SUCCESS;
+ return 0;
}
void test_attr_repo__foreach(void)
diff --git a/tests-clar/core/path.c b/tests-clar/core/path.c
index c1e3ef29..2654ef72 100644
--- a/tests-clar/core/path.c
+++ b/tests-clar/core/path.c
@@ -348,7 +348,7 @@ static int check_one_walkup_step(void *ref, git_buf *path)
cl_assert(info->expect[info->expect_idx] != NULL);
cl_assert_strequal(info->expect[info->expect_idx], path->ptr);
info->expect_idx++;
- return GIT_SUCCESS;
+ return 0;
}
void test_core_path__11_walkup(void)
diff --git a/tests-clar/object/tree/diff.c b/tests-clar/object/tree/diff.c
index d481b6f2..cadba8ea 100644
--- a/tests-clar/object/tree/diff.c
+++ b/tests-clar/object/tree/diff.c
@@ -24,7 +24,7 @@ static void diff_cmp(const git_tree_diff_data *a, const git_tree_diff_data *b)
static int diff_cb(const git_tree_diff_data *diff, void *data)
{
diff_cmp(diff, data);
- return GIT_SUCCESS;
+ return 0;
}
static void test_diff(git_tree *a, git_tree *b, git_tree_diff_cb cb, void *data)
@@ -126,7 +126,7 @@ static int diff_more_cb(const git_tree_diff_data *diff, void *data)
more_data->expect_idx = (more_data->expect_idx + 1) % ARRAY_SIZE(more_data->expect);
- return GIT_SUCCESS;
+ return 0;
}
void test_object_tree_diff__more(void)
diff --git a/tests-clar/status/ignore.c b/tests-clar/status/ignore.c
index 99cb9e8b..5d940077 100644
--- a/tests-clar/status/ignore.c
+++ b/tests-clar/status/ignore.c
@@ -47,6 +47,6 @@ void test_status_ignore__0(void)
}
/* confirm that ignore files were cached */
- cl_git_pass(git_attr_cache__is_cached(g_repo, ".git/info/exclude"));
- cl_git_pass(git_attr_cache__is_cached(g_repo, ".gitignore"));
+ cl_assert(git_attr_cache__is_cached(g_repo, ".git/info/exclude"));
+ cl_assert(git_attr_cache__is_cached(g_repo, ".gitignore"));
}
diff --git a/tests-clar/status/worktree.c b/tests-clar/status/worktree.c
index 132ec1fc..f8097579 100644
--- a/tests-clar/status/worktree.c
+++ b/tests-clar/status/worktree.c
@@ -27,7 +27,7 @@ cb_status__normal( const char *path, unsigned int status_flags, void *payload)
exit:
counts->entry_count++;
- return GIT_SUCCESS;
+ return 0;
}
static int
@@ -40,7 +40,7 @@ cb_status__count(const char *p, unsigned int s, void *payload)
(*count)++;
- return GIT_SUCCESS;
+ return 0;
}