diff options
Diffstat (limited to 'tests-clar/diff')
-rw-r--r-- | tests-clar/diff/diff_helpers.c | 5 | ||||
-rw-r--r-- | tests-clar/diff/diffiter.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tests-clar/diff/diff_helpers.c b/tests-clar/diff/diff_helpers.c index 1436ada03..a1f75ce39 100644 --- a/tests-clar/diff/diff_helpers.c +++ b/tests-clar/diff/diff_helpers.c @@ -32,7 +32,7 @@ int diff_file_cb( e->files++; - if (delta->binary) + if ((delta->flags & GIT_DIFF_FLAG_BINARY) != 0) e->files_binary++; cl_assert(delta->status <= GIT_DELTA_TYPECHANGE); @@ -126,7 +126,8 @@ int diff_foreach_via_iterator( /* if there are no changes, then the patch will be NULL */ if (!patch) { - cl_assert(delta->status == GIT_DELTA_UNMODIFIED || delta->binary == 1); + cl_assert(delta->status == GIT_DELTA_UNMODIFIED || + (delta->flags & GIT_DIFF_FLAG_BINARY) != 0); continue; } diff --git a/tests-clar/diff/diffiter.c b/tests-clar/diff/diffiter.c index 8d550ec0f..932d720f2 100644 --- a/tests-clar/diff/diffiter.c +++ b/tests-clar/diff/diffiter.c @@ -152,8 +152,8 @@ void test_diff_diffiter__max_size_threshold(void) file_count++; hunk_count += (int)git_diff_patch_num_hunks(patch); - assert(delta->binary == 0 || delta->binary == 1); - binary_count += delta->binary; + assert((delta->flags & (GIT_DIFF_FLAG_BINARY|GIT_DIFF_FLAG_NOT_BINARY)) != 0); + binary_count += ((delta->flags & GIT_DIFF_FLAG_BINARY) != 0); git_diff_patch_free(patch); } @@ -185,8 +185,8 @@ void test_diff_diffiter__max_size_threshold(void) file_count++; hunk_count += (int)git_diff_patch_num_hunks(patch); - assert(delta->binary == 0 || delta->binary == 1); - binary_count += delta->binary; + assert((delta->flags & (GIT_DIFF_FLAG_BINARY|GIT_DIFF_FLAG_NOT_BINARY)) != 0); + binary_count += ((delta->flags & GIT_DIFF_FLAG_BINARY) != 0); git_diff_patch_free(patch); } |