diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-03-16 16:48:18 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-03-17 17:45:57 +0100 |
commit | 75fea162d985bea622afa59771fb2d07f5241d1b (patch) | |
tree | 5876692cd2ba574481210fae292eaf7f06005028 /test/radial-gradient.c | |
parent | 4ef32a36ba1e457e8dd6244a6483866d33477aac (diff) |
test: Cleanup macros
The ARRAY_LENGTH macro is used by many tests, although sometimes it is
named ARRAY_SIZE. Define it just once in cairo-test.h and reuse it.
In a similar way, MAX() and MIN() are currently defined in some
specific tests, while they could be reused.
Diffstat (limited to 'test/radial-gradient.c')
-rw-r--r-- | test/radial-gradient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/radial-gradient.c b/test/radial-gradient.c index 25ced708..026876b1 100644 --- a/test/radial-gradient.c +++ b/test/radial-gradient.c @@ -99,8 +99,8 @@ create_pattern (int index) radius1 = radiuses[NUM_GRADIENTS - index - 1]; /* center the gradient */ - left = fmin (x0 - radius0, x1 - radius1); - right = fmax (x0 + radius0, x1 + radius1); + left = MIN (x0 - radius0, x1 - radius1); + right = MAX (x0 + radius0, x1 + radius1); center = (left + right) * 0.5; x0 -= center; x1 -= center; |