summaryrefslogtreecommitdiff
path: root/test/random-intersections-curves-eo.c
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-03 21:38:31 +0300
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-03 21:38:31 +0300
commit316c1683ceb39eb652608adc360cb4da9c22256a (patch)
tree715cd0a324bbc3cc0b753d5354a4870b36996277 /test/random-intersections-curves-eo.c
parent9e45673e197d0f43e296483cc6b5ca6df94e7f02 (diff)
downloadcairo-316c1683ceb39eb652608adc360cb4da9c22256a.tar.gz
[test] Fix the order of random points random-intersections-curves*.
The calls to uniform_random() to get the curve points were in the function arguments, but argument order evaluation is compiler implementation dependent.
Diffstat (limited to 'test/random-intersections-curves-eo.c')
-rw-r--r--test/random-intersections-curves-eo.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/random-intersections-curves-eo.c b/test/random-intersections-curves-eo.c
index 3fa12b2bd..84e9a75de 100644
--- a/test/random-intersections-curves-eo.c
+++ b/test/random-intersections-curves-eo.c
@@ -54,13 +54,16 @@ draw (cairo_t *cr, int width, int height)
cairo_move_to (cr, 0, 0);
for (i = 0; i < NUM_SEGMENTS; i++) {
- cairo_curve_to (cr,
- uniform_random (-SIZE, SIZE),
- uniform_random (-SIZE, SIZE),
- uniform_random (-SIZE, SIZE),
- uniform_random (-SIZE, SIZE),
- uniform_random (0, SIZE),
- uniform_random (0, SIZE));
+ double y3 = uniform_random (0, SIZE);
+ double x3 = uniform_random (0, SIZE);
+ double y2 = uniform_random (-SIZE, SIZE);
+ double x2 = uniform_random (-SIZE, SIZE);
+ double y1 = uniform_random (-SIZE, SIZE);
+ double x1 = uniform_random (-SIZE, SIZE);
+ cairo_curve_to (cr,
+ x1, y1,
+ x2, y2,
+ x3, y3);
}
cairo_close_path (cr);