summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-02-04 17:45:32 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-02-04 17:54:34 +0100
commitba99891710a558412f0962f79993a5b9651eae59 (patch)
treef97d6cdb1c0dca2e78c033e0b47b7caaa5e2dfdd /src/tests
parent5f5253214c4f2c9d224ed5b21affb1be8f9e624b (diff)
efl.canvas.textblock: update style strings
Summary: Update backing -> background_type backing_color -> background_color underline_dash_color -> underline_dashed_color underline - > underline_type strikethrough - > strikethrough_type style -> (effect_type + shadow_direction) underline_dash_width -> underline_dashed_width underline_dashed_gap -> underline_dashed_gap **+prevent unified APIs from supporting legacy style tags, and prevent legacy APIs from the ability to use new unified tags** Reviewers: zmike, woohyun, segfaultxavi, bu5hm4n, cedric Reviewed By: segfaultxavi, bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8523 Differential Revision: https://phab.enlightenment.org/D11188
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/evas/evas_test_textblock.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index 1fee7eb5b1..76bf4c68b1 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4909,23 +4909,33 @@ EFL_START_TEST(efl_canvas_textblock_style)
4909 efl_canvas_textblock_style_apply(txt, "wrap=none"); 4909 efl_canvas_textblock_style_apply(txt, "wrap=none");
4910 ck_assert_int_eq(efl_text_wrap_get(txt), EFL_TEXT_FORMAT_WRAP_NONE); 4910 ck_assert_int_eq(efl_text_wrap_get(txt), EFL_TEXT_FORMAT_WRAP_NONE);
4911 4911
4912 efl_canvas_textblock_style_apply(txt, "backing=on"); 4912 efl_canvas_textblock_style_apply(txt, "background_type=solid");
4913 ck_assert_int_eq(efl_text_background_type_get(txt), EFL_TEXT_STYLE_BACKGROUND_TYPE_SOLID_COLOR); 4913 ck_assert_int_eq(efl_text_background_type_get(txt), EFL_TEXT_STYLE_BACKGROUND_TYPE_SOLID_COLOR);
4914 4914
4915 efl_canvas_textblock_style_apply(txt, "style=far_soft_shadow"); 4915 efl_canvas_textblock_style_apply(txt, "background_color=red");
4916 efl_text_background_color_get(txt, &r, &g, &b, &a);
4917 ck_assert_int_eq(r, 0xFF);
4918 ck_assert_int_eq(g, 0x00);
4919 ck_assert_int_eq(b, 0x00);
4920 ck_assert_int_eq(a, 0xFF);
4921
4922 efl_canvas_textblock_style_apply(txt, "effect_type=far_soft_shadow");
4916 ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW); 4923 ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW);
4917 4924
4918 efl_canvas_textblock_style_apply(txt, "style=glow,top_right"); 4925 efl_canvas_textblock_style_apply(txt, "shadow_direction=top_right");
4919 ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_GLOW);
4920 ck_assert_int_eq(efl_text_shadow_direction_get(txt), EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT); 4926 ck_assert_int_eq(efl_text_shadow_direction_get(txt), EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT);
4921 4927
4922 efl_canvas_textblock_style_apply(txt, "style=far_shadow,top"); 4928 efl_canvas_textblock_style_apply(txt, "shadow_direction=top");
4923 ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SHADOW);
4924 ck_assert_int_eq(efl_text_shadow_direction_get(txt), EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP); 4929 ck_assert_int_eq(efl_text_shadow_direction_get(txt), EFL_TEXT_STYLE_SHADOW_DIRECTION_TOP);
4925 4930
4926 efl_canvas_textblock_style_apply(txt, "style=soft_outline,top,bottom"); 4931 efl_canvas_textblock_style_apply(txt, "effect_type=soft_outline");
4927 ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_SOFT_OUTLINE); 4932 ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_SOFT_OUTLINE);
4928 ck_assert_int_eq(efl_text_shadow_direction_get(txt), EFL_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM); 4933
4934 efl_canvas_textblock_style_apply(txt, "underline_type=none");
4935 ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
4936
4937 efl_canvas_textblock_style_apply(txt, "strikethrough_type=single");
4938 ck_assert_int_eq(efl_text_strikethrough_type_get(txt), EFL_TEXT_STYLE_STRIKETHROUGH_TYPE_SINGLE);
4929 4939
4930 efl_canvas_textblock_style_apply(txt, "color=#EF596C"); 4940 efl_canvas_textblock_style_apply(txt, "color=#EF596C");
4931 efl_text_color_get(txt, &r, &g, &b, &a); 4941 efl_text_color_get(txt, &r, &g, &b, &a);