summaryrefslogtreecommitdiff
path: root/tests/pack
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2017-01-14 16:37:00 +0000
committerlhchavez <lhchavez@lhchavez.com>2017-01-14 16:37:00 +0000
commitf5586f5c73ac162393df10feec0117f59bbd1409 (patch)
tree8b45ddc332baf45087cc9e382a53068f65df4487 /tests/pack
parent96df833b63f37c21240094aa740f05600ef9c2b9 (diff)
downloadlibgit2-f5586f5c73ac162393df10feec0117f59bbd1409.tar.gz
Addressed review feedback
Diffstat (limited to 'tests/pack')
-rw-r--r--tests/pack/indexer.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/pack/indexer.c b/tests/pack/indexer.c
index 2c9724605..1e514b2d6 100644
--- a/tests/pack/indexer.c
+++ b/tests/pack/indexer.c
@@ -155,11 +155,7 @@ void test_pack_indexer__no_tmp_files(void)
cl_git_pass(git_buf_sets(&path, clar_sandbox_path()));
cl_git_pass(find_tmp_file_recurs(&first_tmp_file, &path));
git_buf_free(&path);
- if (git_buf_is_allocated(&first_tmp_file)) {
- git_buf_free(&first_tmp_file);
- cl_warning("Found a temporary file before running the test");
- cl_skip();
- }
+ cl_assert(git_buf_len(&first_tmp_file) == 0);
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL, NULL));
git_indexer_free(idx);
@@ -167,9 +163,6 @@ void test_pack_indexer__no_tmp_files(void)
cl_git_pass(git_buf_sets(&path, clar_sandbox_path()));
cl_git_pass(find_tmp_file_recurs(&first_tmp_file, &path));
git_buf_free(&path);
- if (git_buf_is_allocated(&first_tmp_file)) {
- cl_warning(git_buf_cstr(&first_tmp_file));
- git_buf_free(&first_tmp_file);
- cl_fail("Found a temporary file");
- }
+ cl_assert(git_buf_len(&first_tmp_file) == 0);
+ git_buf_free(&first_tmp_file);
}