Skip to content

Commit fe21515

Browse files
committed
tests: apply: fix missing cl_git_pass wrappers
Some function calls in the new "apply" test suite were missing the checks whether they succeeded as expected. Fix this by adding the missing `cl_git_pass` wrappers.
1 parent 20cb30b commit fe21515

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/apply/both.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void test_apply_both__application_failure_leaves_workdir_unmodified(void)
244244
"This is a modification.\n");
245245

246246
cl_git_pass(git_repository_index(&index, repo));
247-
git_index_add_bypath(index, "veal.txt");
247+
cl_git_pass(git_index_add_bypath(index, "veal.txt"));
248248
cl_git_pass(git_index_write(index));
249249
git_index_free(index);
250250

@@ -291,7 +291,7 @@ void test_apply_both__keeps_nonconflicting_changes(void)
291291
idx_entry.mode = 0100644;
292292
idx_entry.path = "beef.txt";
293293
cl_git_pass(git_oid_fromstr(&idx_entry.id, "898d12687fb35be271c27c795a6b32c8b51da79e"));
294-
git_index_add(index, &idx_entry);
294+
cl_git_pass(git_index_add(index, &idx_entry));
295295

296296
cl_git_pass(git_index_remove(index, "bouilli.txt", 0));
297297
cl_git_pass(git_index_write(index));
@@ -337,7 +337,7 @@ void test_apply_both__can_apply_nonconflicting_file_changes(void)
337337
"This line is added in the index and the workdir.\n");
338338

339339
cl_git_pass(git_repository_index(&index, repo));
340-
git_index_add_bypath(index, "asparagus.txt");
340+
cl_git_pass(git_index_add_bypath(index, "asparagus.txt"));
341341
cl_git_pass(git_index_write(index));
342342
git_index_free(index);
343343

tests/apply/workdir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void test_apply_workdir__modified_index_with_unmodified_workdir_is_ok(void)
167167
sizeof(struct merge_index_entry);
168168

169169
/* mutate the index and leave the workdir matching HEAD */
170-
git_repository_index(&index, repo);
170+
cl_git_pass(git_repository_index(&index, repo));
171171

172172
idx_entry.mode = 0100644;
173173
idx_entry.path = "veal.txt";

0 commit comments

Comments
 (0)