cedric pushed a commit to branch master.

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

commit d3efb9c769c24bc999858655eb3aa80de0a24c1f
Author: Cedric BAIL <[email protected]>
Date:   Thu May 30 11:25:39 2019 -0700

    evas: add test for the new efl_gfx_image_content_region_get API.
    
    Reviewed-by: Hermet Park <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D9095
---
 src/tests/evas/evas_test_image.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index 19ae8ffb6a..b9ff2b02f4 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -666,6 +666,7 @@ EFL_START_TEST(evas_object_image_cached_data_comparision)
    const uint32_t *d2, *n_d2;
    const char *img_path, *img_path2;
    Evas_Object *img, *img2;
+   Eina_Rect region;
 
    Evas *e = _setup_evas();
 
@@ -727,6 +728,18 @@ EFL_START_TEST(evas_object_image_cached_data_comparision)
         fail_if(w2 != n_w2 || h2 != n_h2);
         fail_if(memcmp(d2, n_d2, w2 * h2 * 4));
      }
+
+   region = efl_gfx_image_content_region_get(img);
+   ck_assert_int_eq(region.x, 0);
+   ck_assert_int_eq(region.y, 0);
+   ck_assert_int_eq(region.w, 250);
+   ck_assert_int_eq(region.h, 250);
+   efl_gfx_image_border_set(img, 7, 14, 5, 10);
+   region = efl_gfx_image_content_region_get(img);
+   ck_assert_int_eq(region.x, 7);
+   ck_assert_int_eq(region.y, 5);
+   ck_assert_int_eq(region.w, 250 - 7 - 14);
+   ck_assert_int_eq(region.h, 250 - 5 - 10);
 }
 EFL_END_TEST
 

-- 


Reply via email to