Evas tests: Added textblock line_coord_set tests.
These also verifies the bug fix from my previous commit. SVN revision: 61345
This commit is contained in:
parent
70da0ccdbe
commit
8b499b1984
|
@ -455,8 +455,28 @@ START_TEST(evas_textblock_cursor)
|
||||||
plh = lh;
|
plh = lh;
|
||||||
evas_textblock_cursor_char_next(cur);
|
evas_textblock_cursor_char_next(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
evas_textblock_cursor_paragraph_last(cur);
|
||||||
|
evas_textblock_cursor_line_set(cur, 0);
|
||||||
|
evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh);
|
||||||
|
evas_object_textblock_line_number_geometry_get(tb, 0,
|
||||||
|
&lx, &ly, &lw, &lh);
|
||||||
|
fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh));
|
||||||
|
fail_if(0 != evas_textblock_cursor_line_coord_set(cur, ly + (lh / 2)));
|
||||||
|
|
||||||
|
evas_textblock_cursor_line_set(cur, 1);
|
||||||
|
evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh);
|
||||||
|
evas_object_textblock_line_number_geometry_get(tb, 1,
|
||||||
|
&lx, &ly, &lw, &lh);
|
||||||
|
fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh));
|
||||||
|
fail_if(1 != evas_textblock_cursor_line_coord_set(cur, ly + (lh / 2)));
|
||||||
|
|
||||||
|
/* Before the start of the textblock */
|
||||||
|
fail_if(0 != evas_textblock_cursor_line_coord_set(cur, -50));
|
||||||
|
fail_if(3 != evas_textblock_cursor_line_coord_set(cur, 100000));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: Add tests that check positions left of/right of rtl lines. */
|
/* FIXME: Add tests that check positions left of/right of rtl lines. */
|
||||||
|
|
||||||
END_TB_TEST();
|
END_TB_TEST();
|
||||||
|
|
Loading…
Reference in New Issue