summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-31 12:53:10 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-04-03 17:13:44 +0200
commit8aaff3ba0771e9fa17abb3325b44eb4940361edd (patch)
tree743c6cb92be634547b749f21f19bff8af36f759c
parent39b7069a0ba7dc2d3df2766c83a609ed8299cda5 (diff)
tests/elm: add helper macros for asserting size and position of objects
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11629
-rw-r--r--src/tests/elementary/suite_helpers.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/elementary/suite_helpers.h b/src/tests/elementary/suite_helpers.h
index b2a394b981..cf7b1e7490 100644
--- a/src/tests/elementary/suite_helpers.h
+++ b/src/tests/elementary/suite_helpers.h
@@ -45,4 +45,22 @@ void wheel_object_at(Eo *obj, int x, int y, Eina_Bool horiz, Eina_Bool down);
45void event_callback_single_call_int_data(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); 45void event_callback_single_call_int_data(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
46void event_callback_that_quits_the_main_loop_when_called(); 46void event_callback_that_quits_the_main_loop_when_called();
47void event_callback_that_increments_an_int_when_called(void *data, Evas_Object *obj, void *event_info); 47void event_callback_that_increments_an_int_when_called(void *data, Evas_Object *obj, void *event_info);
48
49
50
51#define assert_object_size_eq(obj, width, height) \
52do \
53{ \
54 Eina_Size2D _sz = efl_gfx_entity_size_get((obj)); \
55 ck_assert_int_eq(_sz.w, (width)); \
56 ck_assert_int_eq(_sz.h, (height)); \
57} while (0)
58
59#define assert_object_pos_eq(obj, _x, _y) \
60do \
61{ \
62 Eina_Position2D _pos = efl_gfx_entity_position_get((obj)); \
63 ck_assert_int_eq(_pos.x, (_x)); \
64 ck_assert_int_eq(_pos.y, (_y)); \
65} while (0)
48#endif 66#endif