diff options
author | Carl Worth <cworth@cworth.org> | 2008-02-28 16:39:42 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-02-28 16:39:42 -0800 |
commit | e7e4a03dd387d264226105dc29c8541f0528fd2c (patch) | |
tree | 7db7472c0dc5289e7fdc5c9ce2bad8d77c6c9579 | |
parent | 602489b150e879bc5cab6b1ad37c107799bf05ae (diff) |
get-path-extents: Fix APPROX_EQUALS to round values on both sides of the comparison
-rw-r--r-- | test/get-path-extents.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/get-path-extents.c b/test/get-path-extents.c index de41a6b5..4d1966b0 100644 --- a/test/get-path-extents.c +++ b/test/get-path-extents.c @@ -78,8 +78,13 @@ check_extents (const char *message, cairo_t *cr, enum ExtentsType type, break; case APPROX_EQUALS: relation_string = "approx. equal"; - if (floor (ext_x1+0.5) == x && floor (ext_y1+0.5) == y && floor (ext_x2+0.5) == x + width && floor (ext_y2+0.5) == y + height) + if (floor (ext_x1 + 0.5) == floor (x + 0.5) && + floor (ext_y1 + 0.5) == floor (y + 0.5) && + floor (ext_x2 + 0.5) == floor (x + width + 0.5) && + floor (ext_y2 + 0.5) == floor (y + height + 0.5)) + { return 1; + } break; case CONTAINS: relation_string = "contain"; |