tasn pushed a commit to branch master.
commit 92a6d2e2d296cd300f5a3f31903f6027187600f1
Author: Tom Hacohen <[email protected]>
Date: Mon Aug 19 17:57:37 2013 +0100
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 | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/tests/evas/evas_test_textblock.c
b/src/tests/evas/evas_test_textblock.c
index 5c063d8..d962390 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -2608,14 +2608,22 @@ START_TEST(evas_textblock_size)
START_TB_TEST();
Evas_Coord w, h, h2, nw, nh;
const char *buf = "This is a <br/> test.<br/>גם בעברית";
+
+ /* 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);
- fail_if(w != 0);
evas_object_textblock_text_markup_set(tb, "a<br/>a");
evas_object_textblock_size_formatted_get(tb, &w, &h2);
--
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk