tasn pushed a commit to branch evas-1.7.
commit fed1cd9894ff28f222a6564ce9e936c4f975655d
Author: Tom Hacohen <[email protected]>
Date: Tue Aug 20 11:56:29 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_test_textblock.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/tests/evas_test_textblock.c b/src/tests/evas_test_textblock.c
index fafa4d0..4a15d3d 100644
--- a/src/tests/evas_test_textblock.c
+++ b/src/tests/evas_test_textblock.c
@@ -2198,13 +2198,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);
fail_if((w != nw) || (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