diff options
author | Benjamin Otte <otte@redhat.com> | 2010-04-28 12:54:54 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-04-28 13:15:09 +0200 |
commit | 2ce1afa3222145e9c4f8c74a0034e0da9e93b70b (patch) | |
tree | 64a86d0ee0c9bdfbd1821cafaf1b36efa6419cb4 /test/buffer-diff.c | |
parent | 2a91d425088cb8a93de76f2f91f32a7f23f0aecd (diff) |
test-suite: add image_diff_is_failure() function
This cleans the code and fixes a boolean logic error where this check
was done manually.
Diffstat (limited to 'test/buffer-diff.c')
-rw-r--r-- | test/buffer-diff.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/buffer-diff.c b/test/buffer-diff.c index 8fc3f891e..087ac459b 100644 --- a/test/buffer-diff.c +++ b/test/buffer-diff.c @@ -252,3 +252,11 @@ image_diff (const cairo_test_context_t *ctx, return CAIRO_STATUS_SUCCESS; } + +cairo_bool_t +image_diff_is_failure (const buffer_diff_result_t *result, + unsigned int tolerance) +{ + return result->pixels_changed && + result->max_diff > tolerance; +} |