summaryrefslogtreecommitdiff
path: root/src/tests/eina/eina_test_quad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eina/eina_test_quad.c')
-rw-r--r--src/tests/eina/eina_test_quad.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/tests/eina/eina_test_quad.c b/src/tests/eina/eina_test_quad.c
index b65f5c2c88..60cb6537c4 100644
--- a/src/tests/eina/eina_test_quad.c
+++ b/src/tests/eina/eina_test_quad.c
@@ -29,14 +29,20 @@ START_TEST(eina_quad_simple)
29 &x1, &y1, 29 &x1, &y1,
30 &x2, &y2, 30 &x2, &y2,
31 &x3, &y3); 31 &x3, &y3);
32 fail_if (r2.x0 != 0.0 || r2.y0 != 5.0 32 fail_if (!EINA_FLT_CMP(r2.x0, 0.0) ||
33 || r2.x1 != 5.0 || r2.y1 != 0.0 33 !EINA_FLT_CMP(r2.y0, 5.0) ||
34 || r2.x2 != 10.0 || r2.y2 != 5.0 34 !EINA_FLT_CMP(r2.x1, 5.0) ||
35 || r2.x3 != 5.0 || r2.y3 != 10.0); 35 !EINA_FLT_CMP(r2.y1, 0.0) ||
36 !EINA_FLT_CMP(r2.x2, 10.0) ||
37 !EINA_FLT_CMP(r2.y2, 5.0) ||
38 !EINA_FLT_CMP(r2.x3, 5.0) ||
39 !EINA_FLT_CMP(r2.y3, 10.0));
36 40
37 eina_quad_rectangle_to(&r2, &r1); 41 eina_quad_rectangle_to(&r2, &r1);
38 fail_if (r1.x != 0 || r1.y != 0 42 fail_if (!EINA_FLT_CMP(r1.x, 0) ||
39 || r1.w != 10 || r1.h != 10); 43 !EINA_FLT_CMP(r1.y, 0) ||
44 !EINA_FLT_CMP(r1.w, 10) ||
45 !EINA_FLT_CMP(r1.h, 10));
40 46
41 eina_quad_coords_set(&r2, 47 eina_quad_coords_set(&r2,
42 0.0, 0.0, 48 0.0, 0.0,
@@ -44,15 +50,21 @@ START_TEST(eina_quad_simple)
44 0.0, 0.0, 50 0.0, 0.0,
45 0.0, 0.0); 51 0.0, 0.0);
46 eina_quad_rectangle_to(&r2, &r1); 52 eina_quad_rectangle_to(&r2, &r1);
47 fail_if (r1.x != 0 || r1.y != 0 53 fail_if (!EINA_FLT_CMP(r1.x, 0) ||
48 || r1.w != 0 || r1.h != 0); 54 !EINA_FLT_CMP(r1.y, 0) ||
55 !EINA_FLT_CMP(r1.w, 0) ||
56 !EINA_FLT_CMP(r1.h, 0));
49 57
50 EINA_RECTANGLE_SET(&r1, 5, 10, 20, 30); 58 EINA_RECTANGLE_SET(&r1, 5, 10, 20, 30);
51 eina_quad_rectangle_from(&r2, &r1); 59 eina_quad_rectangle_from(&r2, &r1);
52 fail_if (r2.x0 != 5.0 || r2.y0 != 10.0 60 fail_if (!EINA_FLT_CMP(r2.x0, 5.0) ||
53 || r2.x1 != 25.0 || r2.y1 != 10.0 61 !EINA_FLT_CMP(r2.y0, 10.0) ||
54 || r2.x2 != 25.0 || r2.y2 != 40.0 62 !EINA_FLT_CMP(r2.x1, 25.0) ||
55 || r2.x3 != 5.0 || r2.y3 != 40.0); 63 !EINA_FLT_CMP(r2.y1, 10.0) ||
64 !EINA_FLT_CMP(r2.x2, 25.0) ||
65 !EINA_FLT_CMP(r2.y2, 40.0) ||
66 !EINA_FLT_CMP(r2.x3, 5.0) ||
67 !EINA_FLT_CMP(r2.y3, 40.0));
56 68
57 eina_shutdown(); 69 eina_shutdown();
58} 70}