summaryrefslogtreecommitdiff
path: root/src/tests/evas/evas_test_image.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-05-30 17:43:20 -0700
committerCedric BAIL <cedric.bail@free.fr>2019-07-12 09:54:08 -0700
commit2020f971a4e74bde2958f5ce64be365fc95715c7 (patch)
treee8d45de5333e7822a7eb9f799c2ab5f5c6227c29 /src/tests/evas/evas_test_image.c
parentb2cb77ca9cbcef71db8d583f52f1959b7eba0bd7 (diff)
evas: improve test to evaluate stretch region effect on content region.
Reviewed-by: Hermet Park <hermetpark@gmail.com> Differential Revision: https://phab.enlightenment.org/D9098
Diffstat (limited to 'src/tests/evas/evas_test_image.c')
-rw-r--r--src/tests/evas/evas_test_image.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index b9ff2b02f4..c66d718ce0 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -655,6 +655,9 @@ _file_to_memory(const char *filename, char **result)
655 return size; 655 return size;
656} 656}
657 657
658static const Efl_Gfx_Image_Stretch_Region hsz[] = { { 8, 8 }, { 16, 555 } };
659static const Efl_Gfx_Image_Stretch_Region vsz[] = { { 8, 8 }, { 16, 512 } };
660
658EFL_START_TEST(evas_object_image_cached_data_comparision) 661EFL_START_TEST(evas_object_image_cached_data_comparision)
659{ 662{
660 int i; 663 int i;
@@ -740,6 +743,14 @@ EFL_START_TEST(evas_object_image_cached_data_comparision)
740 ck_assert_int_eq(region.y, 5); 743 ck_assert_int_eq(region.y, 5);
741 ck_assert_int_eq(region.w, 250 - 7 - 14); 744 ck_assert_int_eq(region.w, 250 - 7 - 14);
742 ck_assert_int_eq(region.h, 250 - 5 - 10); 745 ck_assert_int_eq(region.h, 250 - 5 - 10);
746
747 efl_gfx_image_stretch_region_set(img, EINA_C_ARRAY_ITERATOR_NEW(hsz),
748 EINA_C_ARRAY_ITERATOR_NEW(vsz));
749 region = efl_gfx_image_content_region_get(img);
750 ck_assert_int_eq(region.x, 8);
751 ck_assert_int_eq(region.y, 8);
752 ck_assert_int_eq(region.w, 120);
753 ck_assert_int_eq(region.h, 77);
743} 754}
744EFL_END_TEST 755EFL_END_TEST
745 756