summaryrefslogtreecommitdiff
path: root/src/tests/edje
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2018-09-28 16:13:39 +0900
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>2018-09-28 16:14:00 +0900
commit9fc687a8c3b57c9bd74d48e3ae757ed9f9d3cb7b (patch)
treed64fe733a2bb5ff4d7eb1936ff54163ada8416ec /src/tests/edje
parentcd547c5a078c251a3d66099690d64a6d802e5123 (diff)
edje: call recalc in part_text_get if there is no available text data
Summary: If edje_text_get is called before any edje_text_set function call, it return null, because rp->typedata.text->text is only set by edje_text_set function. If there is no available text data, find it from rp(edc). ref 7bbf18a950c027a365fea1b88e8dc3f16bb81abe Test Plan: make check Reviewers: zmike, id213sin, herdsman Reviewed By: id213sin Subscribers: Hermet, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6961
Diffstat (limited to 'src/tests/edje')
-rw-r--r--src/tests/edje/data/test_textblock.edc1
-rw-r--r--src/tests/edje/edje_test_text.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/edje/data/test_textblock.edc b/src/tests/edje/data/test_textblock.edc
index e3569a6..e8223e7 100644
--- a/src/tests/edje/data/test_textblock.edc
+++ b/src/tests/edje/data/test_textblock.edc
@@ -11,6 +11,7 @@ collections {
11 description { state: "default" 0.0; 11 description { state: "default" 0.0;
12 min: 300 300; 12 min: 300 300;
13 text { 13 text {
14 text: "Bye";
14 style: "tb_style"; 15 style: "tb_style";
15 } 16 }
16 } 17 }
diff --git a/src/tests/edje/edje_test_text.c b/src/tests/edje/edje_test_text.c
index d87ab48..0e975f3 100644
--- a/src/tests/edje/edje_test_text.c
+++ b/src/tests/edje/edje_test_text.c
@@ -105,6 +105,8 @@ EFL_START_TEST(edje_test_textblock)
105 105
106 obj = edje_object_add(evas); 106 obj = edje_object_add(evas);
107 fail_unless(edje_object_file_set(obj, test_layout_get("test_textblock.edj"), "test_textblock")); 107 fail_unless(edje_object_file_set(obj, test_layout_get("test_textblock.edj"), "test_textblock"));
108 txt = edje_object_part_text_get(obj, "text");
109 fail_if(!txt || strcmp(txt, "Bye"));
108 edje_object_part_text_set(obj, "text", buf); 110 edje_object_part_text_set(obj, "text", buf);
109 txt = edje_object_part_text_get(obj, "text"); 111 txt = edje_object_part_text_get(obj, "text");
110 fail_if(!txt || strcmp(txt, buf)); 112 fail_if(!txt || strcmp(txt, buf));