Evas tests: Added textblock test for the last bugfix.

SVN revision: 61558
This commit is contained in:
Tom Hacohen 2011-07-21 13:00:28 +00:00
parent 083095a903
commit c870d8e7ad
1 changed files with 16 additions and 1 deletions

View File

@ -766,7 +766,7 @@ END_TEST
/* Testing items */
START_TEST(evas_textblock_items)
{
Evas_Coord w, h, ih;
Evas_Coord w, h, w2, h2, nw, nh, ih;
START_TB_TEST();
const char *buf = "This is an <item absize=93x152></>.";
@ -844,6 +844,21 @@ START_TEST(evas_textblock_items)
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih);
fail_if((w > 90) || (h <= ih));
/* Relsize and abs size in the same line, all should be the same size */
buf = "<item relsize=64x64 vsize=ascent href=emoticon/knowing-grin></item><item absize=64x64 vsize=ascent href=emoticon/knowing-grin></item><item relsize=64x64 vsize=ascent href=emoticon/knowing-grin></item>";
evas_object_textblock_text_markup_set(tb, buf);
evas_object_textblock_size_formatted_get(tb, &w, &h);
evas_object_textblock_size_native_get(tb, &nw, &nh);
// fail_if((nw != w) || (nh != h));
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h);
evas_textblock_cursor_char_next(cur);
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w2, &h2);
fail_if((w != w2) || (h != h2));
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h);
evas_textblock_cursor_char_next(cur);
evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w2, &h2);
fail_if((w != w2) || (h != h2));
/* FIXME: Also verify x,y positions of the item. */
/* FIXME We need some item tests that involve line wrapping that make the