bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8aaff3ba0771e9fa17abb3325b44eb4940361edd

commit 8aaff3ba0771e9fa17abb3325b44eb4940361edd
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Mar 31 12:53:10 2020 -0400

    tests/elm: add helper macros for asserting size and position of objects
    
    Reviewed-by: Stefan Schmidt <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11629
---
 src/tests/elementary/suite_helpers.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

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);
 void event_callback_single_call_int_data(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED);
 void event_callback_that_quits_the_main_loop_when_called();
 void event_callback_that_increments_an_int_when_called(void *data, Evas_Object 
*obj, void *event_info);
+
+
+
+#define assert_object_size_eq(obj, width, height) \
+do \
+{ \
+   Eina_Size2D _sz = efl_gfx_entity_size_get((obj)); \
+   ck_assert_int_eq(_sz.w, (width)); \
+   ck_assert_int_eq(_sz.h, (height)); \
+} while (0)
+
+#define assert_object_pos_eq(obj, _x, _y) \
+do \
+{ \
+   Eina_Position2D _pos = efl_gfx_entity_position_get((obj)); \
+   ck_assert_int_eq(_pos.x, (_x)); \
+   ck_assert_int_eq(_pos.y, (_y)); \
+} while (0)
 #endif

-- 


Reply via email to