From c56ce3a747eddfd2b5164f5250eab2832c86c52b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 11 Jul 2011 16:39:48 +0000 Subject: [PATCH] Evas tests: Add more style tests to verify bug fixed in previous commit. SVN revision: 61254 --- legacy/evas/src/tests/evas_test_textblock.c | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/legacy/evas/src/tests/evas_test_textblock.c b/legacy/evas/src/tests/evas_test_textblock.c index 70774ec..8824353 100644 --- a/legacy/evas/src/tests/evas_test_textblock.c +++ b/legacy/evas/src/tests/evas_test_textblock.c @@ -824,6 +824,7 @@ END_TEST START_TEST(evas_textblock_style) { Evas_Coord w, h, nw, nh; + Evas_Coord l, r, t, b; START_TB_TEST(); Evas_Textblock_Style *newst; const char *buf = "TestTest2נסיון"; @@ -842,6 +843,45 @@ START_TEST(evas_textblock_style) evas_object_textblock_size_formatted_get(tb, &nw, &nh); fail_if((w >= nw) || (h >= nh)); + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); +// fail_if((l != 0) || (r != 0) || (t != 0) || (b != 0)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 0) || (r != 1) || (t != 0) || (b != 1)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 1) || (t != 1) || (b != 1)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); + + evas_object_textblock_text_markup_set(tb, "Test"); + evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); + fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4)); END_TB_TEST(); } END_TEST -- 2.7.4