From 92a6d2e2d296cd300f5a3f31903f6027187600f1 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 19 Aug 2013 17:57:37 +0100 Subject: [PATCH] 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. --- src/tests/evas/evas_test_textblock.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c index 5c063d88b3..d962390fe7 100644 --- a/src/tests/evas/evas_test_textblock.c +++ b/src/tests/evas/evas_test_textblock.c @@ -2608,15 +2608,23 @@ START_TEST(evas_textblock_size) START_TB_TEST(); Evas_Coord w, h, h2, nw, nh; const char *buf = "This is a
test.
גם בעברית"; - /* 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_native_get(tb, &nw, &nh); ck_assert_int_eq(w, nw); ck_assert_int_eq(h, nh); 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
a"); evas_object_textblock_size_formatted_get(tb, &w, &h2); evas_object_textblock_size_native_get(tb, &nw, &nh);