forked from enlightenment/efl
Evas textblock tests: Fix a broken test and add another test.
The test was running without a text being set. The added test runs with an empty textblock.
This commit is contained in:
parent
ec573948b0
commit
92a6d2e2d2
|
@ -2608,15 +2608,23 @@ START_TEST(evas_textblock_size)
|
||||||
START_TB_TEST();
|
START_TB_TEST();
|
||||||
Evas_Coord w, h, h2, nw, nh;
|
Evas_Coord w, h, h2, nw, nh;
|
||||||
const char *buf = "This is a <br/> test.<br/>גם בעברית";
|
const char *buf = "This is a <br/> test.<br/>גם בעברית";
|
||||||
/* When wrapping is off, native size should be the same as formatted
|
|
||||||
* size */
|
|
||||||
|
|
||||||
|
/* Empty textblock */
|
||||||
evas_object_textblock_size_formatted_get(tb, &w, &h);
|
evas_object_textblock_size_formatted_get(tb, &w, &h);
|
||||||
evas_object_textblock_size_native_get(tb, &nw, &nh);
|
evas_object_textblock_size_native_get(tb, &nw, &nh);
|
||||||
ck_assert_int_eq(w, nw);
|
ck_assert_int_eq(w, nw);
|
||||||
ck_assert_int_eq(h, nh);
|
ck_assert_int_eq(h, nh);
|
||||||
fail_if(w != 0);
|
fail_if(w != 0);
|
||||||
|
|
||||||
|
/* When wrapping is off, native size should be the same as formatted
|
||||||
|
* size */
|
||||||
|
|
||||||
|
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);
|
||||||
|
ck_assert_int_eq(w, nw);
|
||||||
|
ck_assert_int_eq(h, nh);
|
||||||
|
|
||||||
evas_object_textblock_text_markup_set(tb, "a<br/>a");
|
evas_object_textblock_text_markup_set(tb, "a<br/>a");
|
||||||
evas_object_textblock_size_formatted_get(tb, &w, &h2);
|
evas_object_textblock_size_formatted_get(tb, &w, &h2);
|
||||||
evas_object_textblock_size_native_get(tb, &nw, &nh);
|
evas_object_textblock_size_native_get(tb, &nw, &nh);
|
||||||
|
|
Loading…
Reference in New Issue