summaryrefslogtreecommitdiff
path: root/tests-clar
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-02-17 00:13:34 +0100
committerVicent Martí <tanoku@gmail.com>2012-03-06 00:43:10 +0100
commit1a48112342932e9fcd45a1ff5935f1c9c53b83d1 (patch)
treefbb18cfe64e65025c6e1790972d1a106eea4cc54 /tests-clar
parent45d387ac78bcf3167d69b736d0b322717bc492d4 (diff)
downloadlibgit2-1a48112342932e9fcd45a1ff5935f1c9c53b83d1.tar.gz
error-handling: References
Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
Diffstat (limited to 'tests-clar')
-rw-r--r--tests-clar/config/stress.c2
-rw-r--r--tests-clar/core/filebuf.c16
2 files changed, 2 insertions, 16 deletions
diff --git a/tests-clar/config/stress.c b/tests-clar/config/stress.c
index e3b1114f0..25c2c66db 100644
--- a/tests-clar/config/stress.c
+++ b/tests-clar/config/stress.c
@@ -27,7 +27,7 @@ void test_config_stress__dont_break_on_invalid_input(void)
struct git_config_file *file;
git_config *config;
- cl_git_pass(git_path_exists("git-test-config"));
+ cl_assert(git_path_exists("git-test-config"));
cl_git_pass(git_config_file__ondisk(&file, "git-test-config"));
cl_git_pass(git_config_new(&config));
cl_git_pass(git_config_add_file(config, file, 0));
diff --git a/tests-clar/core/filebuf.c b/tests-clar/core/filebuf.c
index 29d6bca74..eab8a26eb 100644
--- a/tests-clar/core/filebuf.c
+++ b/tests-clar/core/filebuf.c
@@ -14,7 +14,7 @@ void test_core_filebuf__0(void)
cl_must_pass(p_close(fd));
cl_git_fail(git_filebuf_open(&file, test, 0));
- cl_git_pass(git_path_exists(testlock));
+ cl_assert(git_path_exists(testlock));
cl_must_pass(p_unlink(testlock));
}
@@ -56,20 +56,6 @@ void test_core_filebuf__2(void)
cl_must_pass(p_unlink(test));
}
-
-/* make sure git_filebuf_open won't reopen an open buffer */
-void test_core_filebuf__3(void)
-{
- git_filebuf file = GIT_FILEBUF_INIT;
- char test[] = "test";
-
- cl_git_pass(git_filebuf_open(&file, test, 0));
- cl_git_fail(git_filebuf_open(&file, test, 0));
-
- git_filebuf_cleanup(&file);
-}
-
-
/* make sure git_filebuf_cleanup clears the buffer */
void test_core_filebuf__4(void)
{