Evas Textblock: update obstacle test

Summary:
Update the test to check that the first character is rendered after the obstacle.
To ensure that the obstacle feature keeps working correctly.

Reviewers: ali.alzyod, woohyun

Reviewed By: ali.alzyod

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11033
This commit is contained in:
abdulleh Ghujeh 2020-02-06 15:36:30 +09:00 committed by WooHyun Jung
parent e710d42fc0
commit f5e13284d7
1 changed files with 7 additions and 0 deletions

View File

@ -4094,6 +4094,8 @@ EFL_START_TEST(evas_textblock_obstacle)
evas_object_resize(rect, 50, 50);
evas_object_resize(rect2, 50, 50);
evas_object_resize(rect3, 50, 50);
evas_object_resize(tb, 300, 400);
evas_object_textblock_text_markup_set(tb, buf);
evas_textblock_cursor_format_prepend(cur, "<wrap=word>");
evas_object_textblock_size_formatted_get(tb, &fw, &fh);
@ -4110,6 +4112,11 @@ EFL_START_TEST(evas_textblock_obstacle)
evas_object_show(rect2);
evas_object_show(rect3);
/*check if first character after the obstacle*/
Evas_Coord cx;
evas_textblock_cursor_char_geometry_get(cur, &cx, NULL, NULL, NULL);
ck_assert_int_eq(cx, 50);
/* Compare formatted size with and without obstacle */
_obstacle_run(tb, rect, 0, fw, fh / 2, fh / 2, fh);
/* Now, with bigger obstacles */