summaryrefslogtreecommitdiff
path: root/src/tests/evas/evas_test_image.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-05-30 11:25:39 -0700
committerCedric BAIL <cedric.bail@free.fr>2019-07-12 09:54:01 -0700
commitd3efb9c769c24bc999858655eb3aa80de0a24c1f (patch)
treec1cbba8caecde0bbe647910d32b1a7d579bd5f21 /src/tests/evas/evas_test_image.c
parent23a2820121920ecfbfa0ad7a4f04cbcc51e87477 (diff)
evas: add test for the new efl_gfx_image_content_region_get API.
Reviewed-by: Hermet Park <hermetpark@gmail.com> Differential Revision: https://phab.enlightenment.org/D9095
Diffstat (limited to 'src/tests/evas/evas_test_image.c')
-rw-r--r--src/tests/evas/evas_test_image.c13
1 files changed, 13 insertions, 0 deletions
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)
666 const uint32_t *d2, *n_d2; 666 const uint32_t *d2, *n_d2;
667 const char *img_path, *img_path2; 667 const char *img_path, *img_path2;
668 Evas_Object *img, *img2; 668 Evas_Object *img, *img2;
669 Eina_Rect region;
669 670
670 Evas *e = _setup_evas(); 671 Evas *e = _setup_evas();
671 672
@@ -727,6 +728,18 @@ EFL_START_TEST(evas_object_image_cached_data_comparision)
727 fail_if(w2 != n_w2 || h2 != n_h2); 728 fail_if(w2 != n_w2 || h2 != n_h2);
728 fail_if(memcmp(d2, n_d2, w2 * h2 * 4)); 729 fail_if(memcmp(d2, n_d2, w2 * h2 * 4));
729 } 730 }
731
732 region = efl_gfx_image_content_region_get(img);
733 ck_assert_int_eq(region.x, 0);
734 ck_assert_int_eq(region.y, 0);
735 ck_assert_int_eq(region.w, 250);
736 ck_assert_int_eq(region.h, 250);
737 efl_gfx_image_border_set(img, 7, 14, 5, 10);
738 region = efl_gfx_image_content_region_get(img);
739 ck_assert_int_eq(region.x, 7);
740 ck_assert_int_eq(region.y, 5);
741 ck_assert_int_eq(region.w, 250 - 7 - 14);
742 ck_assert_int_eq(region.h, 250 - 5 - 10);
730} 743}
731EFL_END_TEST 744EFL_END_TEST
732 745