From c870d8e7ad334718669d32a20ac1503e2db23a41 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 21 Jul 2011 13:00:28 +0000 Subject: [PATCH] Evas tests: Added textblock test for the last bugfix. SVN revision: 61558 --- legacy/evas/src/tests/evas_test_textblock.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/tests/evas_test_textblock.c b/legacy/evas/src/tests/evas_test_textblock.c index 2c1f494843..70e9855cf9 100644 --- a/legacy/evas/src/tests/evas_test_textblock.c +++ b/legacy/evas/src/tests/evas_test_textblock.c @@ -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 ."; @@ -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 = ""; + 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