summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2014-05-30 16:34:56 +0300
committerVyacheslav Reutskiy <v.reutskiy@samsung.com>2014-05-30 16:34:56 +0300
commit34b1f03bc3875133ee3136f6dcff5e082b489486 (patch)
tree5fd598bef3cc3f02aef2434359765283f100ffd9
parent513132424eeb449b2541359909bb048fcf65d44a (diff)
parentad4cdbde3f54a2b662d0027e973a5cab1de4526a (diff)
Merge branch 'develop'0.1.0
-rw-r--r--configure.ac6
-rw-r--r--data/themes/macro.edc2
-rw-r--r--data/themes/widgets/entry.edc80
-rw-r--r--examples/entry_example.c84
-rw-r--r--src/lib/ewe_combobox.c33
-rw-r--r--src/lib/ewe_combobox.eo12
-rw-r--r--src/lib/ewe_combobox_legacy.h13
-rw-r--r--src/lib/ewe_entry.c44
-rw-r--r--src/lib/ewe_entry.eo38
-rw-r--r--src/lib/ewe_entry_legacy.h44
-rw-r--r--src/lib/ewe_statusbar.c6
-rw-r--r--src/lib/ewe_tabs.c10
-rw-r--r--src/lib/ewe_tabs.eo12
-rw-r--r--src/lib/ewe_tabs_legacy.h13
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_item_del.c2
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_select_item_get.c2
-rw-r--r--tests/test_ewe_entry/ewe_entry_label_text.c142
-rw-r--r--tests/test_ewe_entry/ewe_entry_label_visibility.c147
-rw-r--r--tests/test_ewe_entry/test_ewe_entry.c6
-rw-r--r--tests/test_ewe_entry/test_ewe_entry.h8
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_append.c2
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_insert_after.c15
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_insert_before.c6
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_prepend.c4
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_content_get.c110
-rw-r--r--tests/test_ewe_tabs/test_ewe_tabs.c2
-rw-r--r--tests/test_ewe_tabs/test_ewe_tabs.h3
28 files changed, 287 insertions, 562 deletions
diff --git a/configure.ac b/configure.ac
index 818969d..b30c8df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1EWE_VERSION([0], [0], [6]) 1EWE_VERSION([0], [1], [0])
2AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net]) 2AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net])
3AC_PREREQ([2.60]) 3AC_PREREQ([2.60])
4AC_CONFIG_SRCDIR([configure.ac]) 4AC_CONFIG_SRCDIR([configure.ac])
@@ -11,8 +11,8 @@ AM_SILENT_RULES([yes])
11AM_INIT_AUTOMAKE([1.13 dist-bzip2 subdir-objects color-tests]) 11AM_INIT_AUTOMAKE([1.13 dist-bzip2 subdir-objects color-tests])
12 12
13m4_define([package], "Elementary\ Widgets\ Extension") 13m4_define([package], "Elementary\ Widgets\ Extension")
14m4_define([efl_version], [1.10.0-alpha1]) 14m4_define([efl_version], [1.10.0])
15m4_define([elm_version], [1.10.0-alpha1]) 15m4_define([elm_version], [1.10.0])
16 16
17requirement_ewe="" 17requirement_ewe=""
18 18
diff --git a/data/themes/macro.edc b/data/themes/macro.edc
index f78460b..d1b9e2b 100644
--- a/data/themes/macro.edc
+++ b/data/themes/macro.edc
@@ -12,7 +12,7 @@ fonts {
12#define FN_I "PT-Italic" 12#define FN_I "PT-Italic"
13#define FN_BI "PT-BoldItalic" 13#define FN_BI "PT-BoldItalic"
14 14
15#define FONT_SIZE 10 15#define FONT_SIZE 12
16#define LABEL_FONT_SIZE 12 16#define LABEL_FONT_SIZE 12
17 17
18/* 18/*
diff --git a/data/themes/widgets/entry.edc b/data/themes/widgets/entry.edc
index d377d15..87f2580 100644
--- a/data/themes/widgets/entry.edc
+++ b/data/themes/widgets/entry.edc
@@ -206,29 +206,6 @@ group { name: "ewe/scroller/entry/default";
206 } 206 }
207 } 207 }
208 } 208 }
209 part { name: "ewe.label";
210 type: TEXT;
211 description { state: "default" 0.0;
212 visible: 0;
213 min: 20 0;
214 max: -1 0;
215 align: 0 0;
216 text {
217 style: "label_text_style";
218 align: 0.0 1.0;
219 size: 0;
220 }
221 }
222 description { state: "visible" 0.0;
223 inherit: "default" 0.0;
224 visible: 1;
225 min: 20 40;
226 max: -1 40;
227 text {
228 size: 10;
229 }
230 }
231 }
232 part { name: "elm.swallow.icon"; 209 part { name: "elm.swallow.icon";
233 type: SWALLOW; 210 type: SWALLOW;
234 clip_to: "clipper"; 211 clip_to: "clipper";
@@ -312,11 +289,6 @@ group { name: "ewe/scroller/entry/default";
312 fixed: 1 0; 289 fixed: 1 0;
313 min: 8 8; 290 min: 8 8;
314 align: 0.0 0.0; 291 align: 0.0 0.0;
315 rel1 {
316 to_y: "ewe.label";
317 relative: 1.0 1.0;
318 offset: -2 2;
319 }
320 rel2 { 292 rel2 {
321 relative: 1.0 0.0; 293 relative: 1.0 0.0;
322 to_y: "sb_hbar"; 294 to_y: "sb_hbar";
@@ -345,16 +317,6 @@ group { name: "ewe/scroller/entry/default";
345 action: STATE_SET "default" 0.0; 317 action: STATE_SET "default" 0.0;
346 target: "elm.swallow.icon"; 318 target: "elm.swallow.icon";
347 } 319 }
348 program { name: "on_label_show";
349 signal: "ewe,action,show,label"; source: "ewe";
350 action: STATE_SET "visible" 0.0;
351 target: "ewe.label";
352 }
353 program { name: "on_label_hide";
354 signal: "ewe,action,hide,label"; source: "ewe";
355 action: STATE_SET "default" 0.0;
356 target: "ewe.label";
357 }
358 program { name: "on_end_show"; 320 program { name: "on_end_show";
359 signal: "elm,action,show,end"; source: "elm"; 321 signal: "elm,action,show,end"; source: "elm";
360 action: STATE_SET "visible" 0.0; 322 action: STATE_SET "visible" 0.0;
@@ -468,9 +430,7 @@ group { name: "ewe/scroller/entry_single/default";
468 border: 5 5 5 5; 430 border: 5 5 5 5;
469 middle: DEFAULT; 431 middle: DEFAULT;
470 } 432 }
471 rel1 { to: "ewe.label"; 433 rel1.to: "bg";
472 relative: 1.0 0.0;
473 }
474 rel2.to: "bg"; 434 rel2.to: "bg";
475 } 435 }
476 description { state: "disabled" 0.0; 436 description { state: "disabled" 0.0;
@@ -510,30 +470,6 @@ group { name: "ewe/scroller/entry_single/default";
510 color: ENTRY_GLOW_SUCCESS_COLOR; 470 color: ENTRY_GLOW_SUCCESS_COLOR;
511 } 471 }
512 } 472 }
513 part { name: "ewe.label";
514 type: TEXTBLOCK;
515 mouse_events: 0;
516 scale: 1;
517 description { state: "default" 0.0;
518 visible: 0;
519 text {
520 style: "label_text_style";
521 }
522 rel1 { to: "elm.swallow.icon";
523 relative: 1.0 0.0;
524 }
525 rel2 { to: "bg";
526 relative: 0.0 0.0;
527 }
528 }
529 description { state: "visible" 0.0;
530 inherit: "default" 0.0;
531 visible: 1;
532 rel2 { to: "bg";
533 relative: 0.3 1.0;
534 }
535 }
536 }
537 part { name: "clipper"; 473 part { name: "clipper";
538 type: RECT; 474 type: RECT;
539 description { state: "default" 0.0; 475 description { state: "default" 0.0;
@@ -545,9 +481,7 @@ group { name: "ewe/scroller/entry_single/default";
545 type: SWALLOW; 481 type: SWALLOW;
546 clip_to: "clipper"; 482 clip_to: "clipper";
547 description { state: "default" 0.0; 483 description { state: "default" 0.0;
548 rel1 { to: "ewe.label"; 484 rel1.to: "bg";
549 relative: 1.0 0.0;
550 }
551 rel2.to: "bg"; 485 rel2.to: "bg";
552 } 486 }
553 } 487 }
@@ -669,16 +603,6 @@ group { name: "ewe/scroller/entry_single/default";
669 action: STATE_SET "default" 0.00; 603 action: STATE_SET "default" 0.00;
670 target: "glow"; 604 target: "glow";
671 } 605 }
672 program { name: "on_label_show";
673 signal: "ewe,action,show,label"; source: "ewe";
674 action: STATE_SET "visible" 0.0;
675 target: "ewe.label";
676 }
677 program { name: "on_label_hide";
678 signal: "ewe,action,hide,label"; source: "ewe";
679 action: STATE_SET "default" 0.0;
680 target: "ewe.label";
681 }
682 program { name: "on_redex_error"; 606 program { name: "on_redex_error";
683 signal: "ewe,entry,regex,error"; 607 signal: "ewe,entry,regex,error";
684 source: "ewe"; 608 source: "ewe";
diff --git a/examples/entry_example.c b/examples/entry_example.c
index 2089622..1349ecb 100644
--- a/examples/entry_example.c
+++ b/examples/entry_example.c
@@ -8,8 +8,8 @@ static Elm_Entry_Filter_Accept_Set accept_name = {
8}; 8};
9 9
10typedef struct { 10typedef struct {
11Evas_Object *entry2; 11 Evas_Object *entry2;
12Evas_Object *entry3; 12 Evas_Object *entry3;
13} regex_entry_t; 13} regex_entry_t;
14 14
15static void 15static void
@@ -40,39 +40,59 @@ on_changed(void *data, Evas_Object *obj, void *event_info)
40EAPI_MAIN int 40EAPI_MAIN int
41elm_main(int argc, char **argv) 41elm_main(int argc, char **argv)
42{ 42{
43 Evas_Object *win = NULL; 43 Evas_Object *win, *box;
44 Evas_Object *ebox, *label;
44 ewe_init(argc, argv); 45 ewe_init(argc, argv);
45 46
46 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 47 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
47 win = elm_win_util_standard_add("Entry", "Ewe Tests"); 48 win = elm_win_util_standard_add("Entry", "Ewe Tests");
48 elm_win_autodel_set(win, EINA_TRUE); 49 elm_win_autodel_set(win, EINA_TRUE);
49 50
50 Evas_Object *box = elm_box_add(win); 51 box = elm_box_add(win);
51 52
52 // Entry with label example 53 // Entry example
53 Evas_Object *entry = ewe_entry_add(win); 54 ebox = elm_box_add(box);
55 evas_object_size_hint_weight_set(ebox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
56 evas_object_size_hint_align_set(ebox, EVAS_HINT_FILL, EVAS_HINT_FILL);
57
58 Evas_Object *entry = ewe_entry_add(box);
54 elm_entry_scrollable_set(entry, EINA_TRUE); 59 elm_entry_scrollable_set(entry, EINA_TRUE);
55 elm_entry_single_line_set(entry, EINA_TRUE); 60 elm_entry_single_line_set(entry, EINA_TRUE);
56 ewe_entry_label_visible_set(entry, EINA_TRUE);
57 ewe_entry_label_text_set(entry, "Entry label:");
58
59 evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 61 evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
60 evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL); 62 evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
61 evas_object_show(entry); 63 evas_object_show(entry);
62 elm_box_pack_end(box, entry); 64
65 label = elm_label_add(box);
66 elm_object_text_set(label, "Entry:");
67 evas_object_show(label);
68
69 elm_box_pack_end(ebox, label);
70 elm_box_pack_end(ebox, entry);
71 evas_object_show(ebox);
72 elm_box_pack_end(box, ebox);
63 73
64 // Entry with label and example 74 // Entry with label and example
75 ebox = elm_box_add(box);
76 evas_object_size_hint_weight_set(ebox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
77 evas_object_size_hint_align_set(ebox, EVAS_HINT_FILL, EVAS_HINT_FILL);
78
65 Evas_Object *entry1 = ewe_entry_add(win); 79 Evas_Object *entry1 = ewe_entry_add(win);
66 elm_entry_markup_filter_append(entry1, elm_entry_filter_accept_set, &accept_name); 80 elm_entry_markup_filter_append(entry1, elm_entry_filter_accept_set, &accept_name);
67 elm_entry_scrollable_set(entry1, EINA_TRUE); 81 elm_entry_scrollable_set(entry1, EINA_TRUE);
68 elm_entry_single_line_set(entry1, EINA_TRUE); 82 elm_entry_single_line_set(entry1, EINA_TRUE);
69 ewe_entry_label_visible_set(entry1, EINA_TRUE);
70 ewe_entry_label_text_set(entry1, "Characters only:");
71 83
72 evas_object_size_hint_weight_set(entry1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 84 evas_object_size_hint_weight_set(entry1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
73 evas_object_size_hint_align_set(entry1, EVAS_HINT_FILL, EVAS_HINT_FILL); 85 evas_object_size_hint_align_set(entry1, EVAS_HINT_FILL, EVAS_HINT_FILL);
74 evas_object_show(entry1); 86 evas_object_show(entry1);
75 elm_box_pack_end(box, entry1); 87
88 label = elm_label_add(box);
89 elm_object_text_set(label, "Characters only:");
90 evas_object_show(label);
91
92 elm_box_pack_end(ebox, label);
93 elm_box_pack_end(ebox, entry1);
94 evas_object_show(ebox);
95 elm_box_pack_end(box, ebox);
76 96
77 Evas_Object *separator = elm_separator_add(win); 97 Evas_Object *separator = elm_separator_add(win);
78 elm_separator_horizontal_set(separator, EINA_TRUE); 98 elm_separator_horizontal_set(separator, EINA_TRUE);
@@ -82,33 +102,53 @@ elm_main(int argc, char **argv)
82 regex_entry_t regex_entry; 102 regex_entry_t regex_entry;
83 103
84 // Entry to enter regex 104 // Entry to enter regex
85 regex_entry.entry2 = ewe_entry_add(win); 105 ebox = elm_box_add(box);
106 evas_object_size_hint_weight_set(ebox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
107 evas_object_size_hint_align_set(ebox, EVAS_HINT_FILL, EVAS_HINT_FILL);
108
109 regex_entry.entry2 = ewe_entry_add(box);
86 elm_entry_scrollable_set(regex_entry.entry2, EINA_TRUE); 110 elm_entry_scrollable_set(regex_entry.entry2, EINA_TRUE);
87 elm_entry_single_line_set(regex_entry.entry2, EINA_TRUE); 111 elm_entry_single_line_set(regex_entry.entry2, EINA_TRUE);
88 ewe_entry_label_visible_set(regex_entry.entry2, EINA_TRUE);
89 ewe_entry_label_text_set(regex_entry.entry2, "Enter regex:");
90 evas_object_smart_callback_add(regex_entry.entry2, "changed", on_changed, &regex_entry); 112 evas_object_smart_callback_add(regex_entry.entry2, "changed", on_changed, &regex_entry);
91 113
92 evas_object_size_hint_weight_set(regex_entry.entry2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 114 evas_object_size_hint_weight_set(regex_entry.entry2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
93 evas_object_size_hint_align_set(regex_entry.entry2, EVAS_HINT_FILL, EVAS_HINT_FILL); 115 evas_object_size_hint_align_set(regex_entry.entry2, EVAS_HINT_FILL, EVAS_HINT_FILL);
94 evas_object_show(regex_entry.entry2); 116 evas_object_show(regex_entry.entry2);
95 elm_box_pack_end(box, regex_entry.entry2); 117
118 label = elm_label_add(box);
119 elm_object_text_set(label, "Enter regex:");
120 evas_object_show(label);
121
122 elm_box_pack_end(ebox, label);
123 elm_box_pack_end(ebox, regex_entry.entry2);
124 evas_object_show(ebox);
125 elm_box_pack_end(box, ebox);
96 126
97 // Entry to check regex 127 // Entry to check regex
98 regex_entry.entry3 = ewe_entry_add(win); 128 ebox = elm_box_add(box);
129 evas_object_size_hint_weight_set(ebox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
130 evas_object_size_hint_align_set(ebox, EVAS_HINT_FILL, EVAS_HINT_FILL);
131
132 regex_entry.entry3 = ewe_entry_add(ebox);
99 elm_entry_scrollable_set(regex_entry.entry3, EINA_TRUE); 133 elm_entry_scrollable_set(regex_entry.entry3, EINA_TRUE);
100 elm_entry_single_line_set(regex_entry.entry3, EINA_TRUE); 134 elm_entry_single_line_set(regex_entry.entry3, EINA_TRUE);
101 ewe_entry_label_visible_set(regex_entry.entry3, EINA_TRUE);
102 ewe_entry_label_text_set(regex_entry.entry3, "Check regex:");
103 elm_entry_editable_set(regex_entry.entry3, EINA_FALSE); 135 elm_entry_editable_set(regex_entry.entry3, EINA_FALSE);
104 136
105 evas_object_size_hint_weight_set(regex_entry.entry3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 137 evas_object_size_hint_weight_set(regex_entry.entry3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
106 evas_object_size_hint_align_set(regex_entry.entry3, EVAS_HINT_FILL, EVAS_HINT_FILL); 138 evas_object_size_hint_align_set(regex_entry.entry3, EVAS_HINT_FILL, EVAS_HINT_FILL);
107 evas_object_show(regex_entry.entry3); 139 evas_object_show(regex_entry.entry3);
108 elm_box_pack_end(box, regex_entry.entry3); 140
141 label = elm_label_add(box);
142 elm_object_text_set(label, "Check regex:");
143 evas_object_show(label);
144
145 elm_box_pack_end(ebox, label);
146 elm_box_pack_end(ebox, regex_entry.entry3);
147 evas_object_show(ebox);
148 elm_box_pack_end(box, ebox);
109 149
110 evas_object_resize(win, 400, 400); 150 evas_object_resize(win, 400, 400);
111 evas_object_resize(box, 300, 300); 151 evas_object_resize(box, 400, 400);
112 evas_object_show(box); 152 evas_object_show(box);
113 evas_object_show(win); 153 evas_object_show(win);
114 154
diff --git a/src/lib/ewe_combobox.c b/src/lib/ewe_combobox.c
index 83530b2..ce6aab9 100644
--- a/src/lib/ewe_combobox.c
+++ b/src/lib/ewe_combobox.c
@@ -254,6 +254,15 @@ _ewe_combobox_expanded_get(Eo *obj EINA_UNUSED,
254 return sd->expanded; 254 return sd->expanded;
255} 255}
256 256
257EOLIAN static Eina_Bool
258_ewe_combobox_text_set(Eo *obj EINA_UNUSED,
259 Ewe_Combobox_Smart_Data *sd,
260 Eina_Stringshare *title)
261{
262 edje_object_part_text_set(sd->combobox, "ewe.text", title);
263 return EINA_TRUE;
264}
265
257EOLIAN static Ewe_Combobox_Item * 266EOLIAN static Ewe_Combobox_Item *
258_ewe_combobox_item_add(Eo *obj, 267_ewe_combobox_item_add(Eo *obj,
259 Ewe_Combobox_Smart_Data *sd, 268 Ewe_Combobox_Smart_Data *sd,
@@ -266,11 +275,7 @@ _ewe_combobox_item_add(Eo *obj,
266 ret->owner = obj; 275 ret->owner = obj;
267 if (!title) title = ""; 276 if (!title) title = "";
268 ret->title = eina_stringshare_add(title); 277 ret->title = eina_stringshare_add(title);
269 if (eina_list_count(sd->items) == 0) 278
270 {
271 edje_object_part_text_set(sd->combobox, "ewe.text", title);
272 sd->selected = ret;
273 }
274 ret->index = eina_list_count(sd->items); 279 ret->index = eina_list_count(sd->items);
275 sd->items = eina_list_append(sd->items, ret); 280 sd->items = eina_list_append(sd->items, ret);
276 eina_strbuf_free(buf); 281 eina_strbuf_free(buf);
@@ -294,14 +299,17 @@ _ewe_combobox_item_del(Eo *obj,
294 Eina_List *l; 299 Eina_List *l;
295 int indx = 0, selindex = 0; 300 int indx = 0, selindex = 0;
296 Ewe_Combobox_Item *it, *selected; 301 Ewe_Combobox_Item *it, *selected;
297 selected = ewe_combobox_select_item_get(obj); 302 if (sd->selected)
298 selindex = selected->index - 1;
299 if (item->index <= selected->index)
300 { 303 {
301 if (selindex < 0) 304 selected = ewe_combobox_select_item_get(obj);
302 ewe_combobox_select_item_set(obj, selected->index + 1); 305 selindex = selected->index - 1;
303 else if (item->index == selected->index) 306 if (item->index <= selected->index)
304 ewe_combobox_select_item_set(obj, selindex); 307 {
308 if (selindex < 0)
309 ewe_combobox_select_item_set(obj, selected->index + 1);
310 else if (item->index == selected->index)
311 ewe_combobox_select_item_set(obj, selindex);
312 }
305 } 313 }
306 sd->items = eina_list_remove(sd->items, item); 314 sd->items = eina_list_remove(sd->items, item);
307 _item_data_free(item); 315 _item_data_free(item);
@@ -387,6 +395,7 @@ EOLIAN static Ewe_Combobox_Item *
387_ewe_combobox_select_item_get(Eo *obj EINA_UNUSED, 395_ewe_combobox_select_item_get(Eo *obj EINA_UNUSED,
388 Ewe_Combobox_Smart_Data *sd) 396 Ewe_Combobox_Smart_Data *sd)
389{ 397{
398 if (!sd->selected) return NULL;
390 return sd->selected; 399 return sd->selected;
391} 400}
392 401
diff --git a/src/lib/ewe_combobox.eo b/src/lib/ewe_combobox.eo
index 04920b3..e8a2c31 100644
--- a/src/lib/ewe_combobox.eo
+++ b/src/lib/ewe_combobox.eo
@@ -109,6 +109,18 @@ class Ewe_Combobox (Elm_Widget)
109 @ingroup combobox*/ 109 @ingroup combobox*/
110 return Eina_Bool; 110 return Eina_Bool;
111 } 111 }
112 text_set {
113 /*@
114 Set title of the combobox.
115
116 @return EINA_TRUE on success, EINA_FALSE otherwise
117
118 @ingroup combobox*/
119 return Eina_Bool;
120 params {
121 @in Eina_Stringshare *title; /*@New items title*/
122 }
123 }
112 } 124 }
113 125
114 implements { 126 implements {
diff --git a/src/lib/ewe_combobox_legacy.h b/src/lib/ewe_combobox_legacy.h
index f2799c5..74026f2 100644
--- a/src/lib/ewe_combobox_legacy.h
+++ b/src/lib/ewe_combobox_legacy.h
@@ -70,7 +70,7 @@ ewe_combobox_items_list_get(const Evas_Object *obj);
70/** 70/**
71 * This setts title of the combobox item. 71 * This setts title of the combobox item.
72 * 72 *
73 * @param item The combobox item 73 * @param index The combobox item index
74 * @param title Text to be setted as title of the combobox item 74 * @param title Text to be setted as title of the combobox item
75 * @return EINA_TRUE on success, EINA_FALSE otherwise 75 * @return EINA_TRUE on success, EINA_FALSE otherwise
76 * 76 *
@@ -82,6 +82,17 @@ ewe_combobox_item_title_set(Evas_Object *obj,
82 Eina_Stringshare *title); 82 Eina_Stringshare *title);
83 83
84/** 84/**
85 * This sets title for the combobox.
86 *
87 * @param title Text to be setted as title of the combobox
88 * @return EINA_TRUE on success, EINA_FALSE otherwise
89 *
90 * @ingroup combobox
91 */
92EAPI Eina_Bool
93ewe_combobox_text_set(Evas_Object *obj,
94 Eina_Stringshare *title);
95/**
85 * This gets title of the combobox item. 96 * This gets title of the combobox item.
86 * 97 *
87 * @param item The combobox item 98 * @param item The combobox item
diff --git a/src/lib/ewe_entry.c b/src/lib/ewe_entry.c
index 5927adf..9cacb59 100644
--- a/src/lib/ewe_entry.c
+++ b/src/lib/ewe_entry.c
@@ -249,44 +249,6 @@ _ewe_entry_regex_autocheck_set(Eo *obj, Ewe_Entry_Data *sd, Eina_Bool autocheck)
249 return EINA_TRUE; 249 return EINA_TRUE;
250} 250}
251 251
252EOLIAN void
253_ewe_entry_label_text_set(Eo *obj, Ewe_Entry_Data *sd EINA_UNUSED, const char *label_text)
254{
255 EWE_ENTRY_PARENT_DATA_GET(obj, parent_sd);
256
257 if (!obj || !parent_sd->scroll) return;
258 edje_object_part_text_set(parent_sd->scr_edje, "ewe.label", label_text);
259}
260
261EOLIAN const char *
262_ewe_entry_label_text_get(Eo *obj, Ewe_Entry_Data *sd EINA_UNUSED)
263{
264 EWE_ENTRY_PARENT_DATA_GET(obj, parent_sd);
265
266 if (!obj) return NULL;
267 return edje_object_part_text_get(parent_sd->scr_edje, "ewe.label");
268}
269
270EOLIAN void
271_ewe_entry_label_visible_set(Eo *obj, Ewe_Entry_Data *sd, Eina_Bool visible)
272{
273 EWE_ENTRY_PARENT_DATA_GET(obj, parent_sd);
274
275 if (!obj || !parent_sd->scroll) return;
276 sd->label_visible = visible;
277 if (visible)
278 edje_object_signal_emit(parent_sd->scr_edje, "ewe,action,show,label", "ewe");
279 else
280 edje_object_signal_emit(parent_sd->scr_edje, "ewe,action,hide,label", "ewe");
281}
282
283EOLIAN Eina_Bool
284_ewe_entry_label_visible_get(Eo *obj, Ewe_Entry_Data *sd)
285{
286 if (!obj) return EINA_FALSE;
287 return sd->label_visible;
288}
289
290EOLIAN int 252EOLIAN int
291_ewe_entry_regex_error_get(Eo *obj, Ewe_Entry_Data *sd) 253_ewe_entry_regex_error_get(Eo *obj, Ewe_Entry_Data *sd)
292{ 254{
@@ -368,13 +330,9 @@ _ewe_entry_elm_widget_disable(Eo *obj, Ewe_Entry_Data *_pd EINA_UNUSED)
368EAPI void 330EAPI void
369ewe_entry_entry_set(Evas_Object *obj, const char *text) 331ewe_entry_entry_set(Evas_Object *obj, const char *text)
370{ 332{
371 if (!text) return;
372
373 EWE_ENTRY_CHECK(obj); 333 EWE_ENTRY_CHECK(obj);
374 EWE_ENTRY_PARENT_DATA_GET(obj, parent_sd);
375 334
376 edje_object_part_text_set(parent_sd->entry_edje, 335 eo_do(obj, elm_obj_layout_text_set(NULL, text));
377 "elm.text", strdup(text));
378 eo_do(obj, ewe_obj_entry_regex_check()); 336 eo_do(obj, ewe_obj_entry_regex_check());
379} 337}
380 338
diff --git a/src/lib/ewe_entry.eo b/src/lib/ewe_entry.eo
index 17ee129..a1aeca2 100644
--- a/src/lib/ewe_entry.eo
+++ b/src/lib/ewe_entry.eo
@@ -3,44 +3,6 @@ class Ewe_Entry (Elm_Entry)
3 eo_prefix: ewe_obj_entry; 3 eo_prefix: ewe_obj_entry;
4 data: Ewe_Entry_Data; 4 data: Ewe_Entry_Data;
5 properties { 5 properties {
6 label_visible {
7 set {
8 /*@
9 This sets the label visibility.
10
11 @ingroup Entry */
12 }
13 get {
14 /*@
15 Get whether the label of Entry is visible.
16
17 @return EINA_TRUE if the lable is visible, otherwise returns EINA_FALSE
18
19 @ingroup Entry */
20 }
21 values {
22 Eina_Bool visible;
23 }
24 }
25 label_text {
26 set {
27 /*@
28 This sets the text displayed within the label of Entry.
29
30 @ingroup Entry */
31 }
32 get {
33 /*@
34 Get text of Entry's label.
35
36 @return The text of label
37
38 @ingroup Entry */
39 }
40 values {
41 const char *label_text;
42 }
43 }
44 regex_glow { 6 regex_glow {
45 get { 7 get {
46 /*@ 8 /*@
diff --git a/src/lib/ewe_entry_legacy.h b/src/lib/ewe_entry_legacy.h
index 5c69a3e..115cfe7 100644
--- a/src/lib/ewe_entry_legacy.h
+++ b/src/lib/ewe_entry_legacy.h
@@ -15,50 +15,6 @@
15EAPI Evas_Object *ewe_entry_add(Evas_Object *parent); 15EAPI Evas_Object *ewe_entry_add(Evas_Object *parent);
16 16
17/** 17/**
18 * This sets the label visibility.
19 *
20 * @param obj The entry object
21 * @param visible If true, the lable is visible
22 *
23 * @note It works only if scrollable mode is on
24 *
25 * @ingroup Entry
26 */
27EAPI void ewe_entry_label_visible_set(Evas_Object *obj, Eina_Bool visible);
28/**
29 * Get whether the label of Entry is visible.
30 *
31 * @param obj The entry object
32 * @return If true, the lable is visible
33 *
34* @note It works only if scrollable mode is on
35 *
36 * @ingroup Entry
37 */
38EAPI Eina_Bool ewe_entry_label_visible_get(const Evas_Object *obj);
39/**
40 * This sets the text displayed within the label of Entry.
41 *
42 * @param obj The entry object
43 * @param entry The text to be displayed
44 *
45 * @note It works only if scrollable mode is on
46 *
47 * @ingroup Entry
48 */
49EAPI void ewe_entry_label_text_set(Evas_Object *obj, const char *label_text);
50/**
51 * Get text of Entry's label.
52 *
53 * @param obj The entry object
54 * @return The text of label
55 *
56 * @note It works only if scrollable mode is on
57 *
58 * @ingroup Entry
59 */
60EAPI const char * ewe_entry_label_text_get(const Evas_Object *obj);
61/**
62 * Set regular expresion to be compiled and used. 18 * Set regular expresion to be compiled and used.
63 * 19 *
64 * @param obj The entry object 20 * @param obj The entry object
diff --git a/src/lib/ewe_statusbar.c b/src/lib/ewe_statusbar.c
index 136b981..2c78d47 100644
--- a/src/lib/ewe_statusbar.c
+++ b/src/lib/ewe_statusbar.c
@@ -191,6 +191,8 @@ _ewe_statusbar_item_insert_before(Eo * obj,
191{ 191{
192 if ((!item) || (!before) || (item->parent != obj) || (before->parent != obj)) 192 if ((!item) || (!before) || (item->parent != obj) || (before->parent != obj))
193 return EINA_FALSE; 193 return EINA_FALSE;
194 if (item == before)
195 return EINA_FALSE;
194 196
195 if (!evas_object_box_remove(sd->box, item->markup)) return EINA_FALSE; 197 if (!evas_object_box_remove(sd->box, item->markup)) return EINA_FALSE;
196 sd->items = eina_list_remove(sd->items, item); 198 sd->items = eina_list_remove(sd->items, item);
@@ -211,6 +213,8 @@ _ewe_statusbar_item_insert_after(Eo * obj,
211{ 213{
212 if ((!item) || (!after) || (item->parent != obj) || (after->parent != obj)) 214 if ((!item) || (!after) || (item->parent != obj) || (after->parent != obj))
213 return EINA_FALSE; 215 return EINA_FALSE;
216 if (item == after)
217 return EINA_FALSE;
214 218
215 if (!evas_object_box_remove(sd->box, item->markup)) return EINA_FALSE; 219 if (!evas_object_box_remove(sd->box, item->markup)) return EINA_FALSE;
216 sd->items = eina_list_remove(sd->items, item); 220 sd->items = eina_list_remove(sd->items, item);
@@ -219,7 +223,7 @@ _ewe_statusbar_item_insert_after(Eo * obj,
219 evas_object_box_insert_after(sd->box, item->markup, after->markup); 223 evas_object_box_insert_after(sd->box, item->markup, after->markup);
220 _items_id_reorder(sd->items); 224 _items_id_reorder(sd->items);
221 225
222 return EINA_FALSE; 226 return EINA_TRUE;
223} 227}
224 228
225 229
diff --git a/src/lib/ewe_tabs.c b/src/lib/ewe_tabs.c
index d022a49..39cb03d 100644
--- a/src/lib/ewe_tabs.c
+++ b/src/lib/ewe_tabs.c
@@ -282,6 +282,16 @@ _ewe_tabs_item_content_set(Eo *obj,
282 return elm_layout_content_set(item->content, "ewe.content", content); 282 return elm_layout_content_set(item->content, "ewe.content", content);
283} 283}
284 284
285EOLIAN static const Evas_Object *
286_ewe_tabs_item_content_get(Eo *obj,
287 Ewe_Tabs_Smart_Data *sd EINA_UNUSED,
288 Ewe_Tabs_Item *item)
289{
290 if ((!item) || (item->owner != obj)) return NULL;
291 return elm_layout_content_get(item->content, "ewe.content");
292}
293
294
285EOLIAN static Evas_Object * 295EOLIAN static Evas_Object *
286_ewe_tabs_item_content_unset(Eo *obj, 296_ewe_tabs_item_content_unset(Eo *obj,
287 Ewe_Tabs_Smart_Data *sd EINA_UNUSED, 297 Ewe_Tabs_Smart_Data *sd EINA_UNUSED,
diff --git a/src/lib/ewe_tabs.eo b/src/lib/ewe_tabs.eo
index 990aec0..da5a3f7 100644
--- a/src/lib/ewe_tabs.eo
+++ b/src/lib/ewe_tabs.eo
@@ -148,6 +148,18 @@ class Ewe_Tabs (Elm_Widget)
148 @in Evas_Object *content; /*@New items content*/ 148 @in Evas_Object *content; /*@New items content*/
149 } 149 }
150 } 150 }
151 item_content_get {
152 /*@
153 Get content from tabs item
154
155 @return Evas_Object pointer to content of item on success, NULL otherwise
156
157 @ingroup tabs*/
158 return const Evas_Object *;
159 params {
160 @in Ewe_Tabs_Item *item; /*@The tabs item*/
161 }
162 }
151 item_content_unset { 163 item_content_unset {
152 /*@ 164 /*@
153 Unset content from tabs item 165 Unset content from tabs item
diff --git a/src/lib/ewe_tabs_legacy.h b/src/lib/ewe_tabs_legacy.h
index 9a57a37..193ed5a 100644
--- a/src/lib/ewe_tabs_legacy.h
+++ b/src/lib/ewe_tabs_legacy.h
@@ -114,6 +114,19 @@ ewe_tabs_item_content_unset(Evas_Object *obj,
114 Ewe_Tabs_Item *item); 114 Ewe_Tabs_Item *item);
115 115
116/** 116/**
117 * This gets content from tabs item.
118 *
119 * @param item The tabs item
120 * @return Evas_Object *content
121 *
122 * @ingroup tabs
123 */
124EAPI const Evas_Object *
125ewe_tabs_item_content_get(Evas_Object *obj,
126 Ewe_Tabs_Item *item);
127
128
129/**
117 * This setts icon to tabs item. 130 * This setts icon to tabs item.
118 * 131 *
119 * @param item The tabs item 132 * @param item The tabs item
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c2dccd8..b673c4b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -30,8 +30,6 @@ ewe_init_test_LDADD = ${LD}
30ewe_entry_test_SOURCES = \ 30ewe_entry_test_SOURCES = \
31test_ewe_entry/test_ewe_entry.c \ 31test_ewe_entry/test_ewe_entry.c \
32test_ewe_entry/ewe_entry_add.c \ 32test_ewe_entry/ewe_entry_add.c \
33test_ewe_entry/ewe_entry_label_text.c \
34test_ewe_entry/ewe_entry_label_visibility.c \
35test_ewe_entry/ewe_entry_regex_check.c \ 33test_ewe_entry/ewe_entry_regex_check.c \
36test_ewe_entry/ewe_entry_regex_set.c \ 34test_ewe_entry/ewe_entry_regex_set.c \
37test_ewe_entry/ewe_entry_regex_unset.c \ 35test_ewe_entry/ewe_entry_regex_unset.c \
@@ -75,6 +73,7 @@ test_ewe_tabs/ewe_tabs_items_list_get.c \
75test_ewe_tabs/ewe_tabs_add.c \ 73test_ewe_tabs/ewe_tabs_add.c \
76test_ewe_tabs/ewe_tabs_item_content_set.c \ 74test_ewe_tabs/ewe_tabs_item_content_set.c \
77test_ewe_tabs/ewe_tabs_item_content_unset.c \ 75test_ewe_tabs/ewe_tabs_item_content_unset.c \
76test_ewe_tabs/ewe_tabs_item_content_get.c \
78test_ewe_tabs/ewe_tabs_item_icon_set.c \ 77test_ewe_tabs/ewe_tabs_item_icon_set.c \
79test_ewe_tabs/ewe_tabs_item_icon_unset.c \ 78test_ewe_tabs/ewe_tabs_item_icon_unset.c \
80test_ewe_tabs/ewe_tabs_item_button_set.c \ 79test_ewe_tabs/ewe_tabs_item_button_set.c \
diff --git a/tests/test_ewe_combobox/ewe_combobox_item_del.c b/tests/test_ewe_combobox/ewe_combobox_item_del.c
index 98c9bf1..eb811cf 100644
--- a/tests/test_ewe_combobox/ewe_combobox_item_del.c
+++ b/tests/test_ewe_combobox/ewe_combobox_item_del.c
@@ -41,6 +41,7 @@
41 * @step 3 ewe_combobox added 41 * @step 3 ewe_combobox added
42 * @step 4 Two items with title added to combobox 42 * @step 4 Two items with title added to combobox
43 * @step 5 3rd item without title added to combobox 43 * @step 5 3rd item without title added to combobox
44 * @step 6 call ewe_combobox_select_item_set for first item
44 * 45 *
45 * @procedure 46 * @procedure
46 * @step 1 remove second item 47 * @step 1 remove second item
@@ -65,6 +66,7 @@ EWE_TEST(ewe_combobox_item_del_test_p)
65 Ewe_Combobox_Item *it1 = ewe_combobox_item_add(combobox, "item1"); 66 Ewe_Combobox_Item *it1 = ewe_combobox_item_add(combobox, "item1");
66 Ewe_Combobox_Item *it2 = ewe_combobox_item_add(combobox, "item2"); 67 Ewe_Combobox_Item *it2 = ewe_combobox_item_add(combobox, "item2");
67 Ewe_Combobox_Item *it3 = ewe_combobox_item_add(combobox, NULL); 68 Ewe_Combobox_Item *it3 = ewe_combobox_item_add(combobox, NULL);
69 ewe_combobox_select_item_set(combobox, 1);
68 70
69 ck_assert_msg(ewe_combobox_item_del(combobox, it2) == EINA_TRUE, "Cannot remove second item"); 71 ck_assert_msg(ewe_combobox_item_del(combobox, it2) == EINA_TRUE, "Cannot remove second item");
70 ck_assert_msg(ewe_combobox_item_del(combobox, it3) == EINA_TRUE, "Cannot remove 3rd item"); 72 ck_assert_msg(ewe_combobox_item_del(combobox, it3) == EINA_TRUE, "Cannot remove 3rd item");
diff --git a/tests/test_ewe_combobox/ewe_combobox_select_item_get.c b/tests/test_ewe_combobox/ewe_combobox_select_item_get.c
index dfe8f38..de1c454 100644
--- a/tests/test_ewe_combobox/ewe_combobox_select_item_get.c
+++ b/tests/test_ewe_combobox/ewe_combobox_select_item_get.c
@@ -41,6 +41,7 @@
41 * @step 2 parent window created 41 * @step 2 parent window created
42 * @step 3 ewe_combobox created 42 * @step 3 ewe_combobox created
43 * @step 4 item added to combobox: "selected" 43 * @step 4 item added to combobox: "selected"
44 * @step 5 call ewe_combobox_select_item_set for first item
44 * 45 *
45 * @procedure 46 * @procedure
46 * @step 1 call ewe_combobox_select_item_get on combobox 47 * @step 1 call ewe_combobox_select_item_get on combobox
@@ -59,6 +60,7 @@ EWE_TEST(ewe_combobox_select_item_get_test_p1)
59 Evas_Object *win = elm_win_util_standard_add("test", "test"); 60 Evas_Object *win = elm_win_util_standard_add("test", "test");
60 Evas_Object *combobox = ewe_combobox_add(win); 61 Evas_Object *combobox = ewe_combobox_add(win);
61 Ewe_Combobox_Item *it1 = ewe_combobox_item_add(combobox, "selected"); 62 Ewe_Combobox_Item *it1 = ewe_combobox_item_add(combobox, "selected");
63 ewe_combobox_select_item_set(combobox, 0);
62 64
63 ck_assert_msg((ewe_combobox_select_item_get(combobox) == it1), "Wrong selected item"); 65 ck_assert_msg((ewe_combobox_select_item_get(combobox) == it1), "Wrong selected item");
64 66
diff --git a/tests/test_ewe_entry/ewe_entry_label_text.c b/tests/test_ewe_entry/ewe_entry_label_text.c
deleted file mode 100644
index 69abde9..0000000
--- a/tests/test_ewe_entry/ewe_entry_label_text.c
+++ /dev/null
@@ -1,142 +0,0 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html.
18 */
19#include "test_ewe_entry.h"
20
21/**
22 * @addtogroup ewe_entry_test
23 * @{
24 * @addtogroup ewe_entry_label_text
25 * @{
26 * ewe_entry
27 * <TABLE>
28 * @}
29 */
30
31/**
32 * @addtogroup ewe_entry_label_text
33 * @{
34 * <tr>
35 * <td>ewe_entry_label_text</td>
36 * <td>ewe_entry_label_text_test_n</td>
37 * <td>
38 * @precondition
39 * @step 1 init ewe
40 * @step 2 create parent window
41 * @step 3 call ewe_entry_add() with proper parameter
42 * @procedure
43 * @step 1 call ewe_entry_label_text_get();
44 * </td>
45 * <td>(Evas_Object *) entry</td>
46 * <td>ewe_entry_label_text_get() should return NULL if Entry is not scrollable</td>
47 * <td>_REAL_RESULT_</td>
48 * <td>_PASSED_</td>
49 * </tr>
50 * @}
51 */
52EWE_TEST(ewe_entry_label_text_test_n)
53{
54 ewe_init(0, 0);
55 Evas_Object *win = elm_win_util_standard_add("entry", "Entry");
56 Evas_Object *obj = ewe_entry_add(win);
57
58 ck_assert_msg(ewe_entry_label_text_get(obj) == NULL, "Text should not be returned if Entry is not scrollable!");
59 evas_object_del(win);
60 ewe_shutdown();
61}
62END_TEST
63
64/**
65 * @addtogroup ewe_entry_label_text
66 * @{
67 * <tr>
68 * <td>ewe_entry_label_text</td>
69 * <td>ewe_entry_label_text_test_p1</td>
70 * <td>
71 * @precondition
72 * @step 1 init ewe
73 * @step 2 create parent window
74 * @step 3 call ewe_entry_add() with proper parameter
75 * @step 4 set entry scrollable
76 * @procedure
77 * @step 1 call ewe_entry_label_text_get(obj)
78 * </td>
79 * <td>(Evas_Object *) entry</td>
80 * <td>Empty string should be returned</td>
81 * <td>_REAL_RESULT_</td>
82 * <td>_PASSED_</td>
83 * </tr>
84 * @}
85 */
86EWE_TEST(ewe_entry_label_text_test_p1)
87{
88 ewe_init(0, 0);
89 Evas_Object *win = elm_win_util_standard_add("entry", "Entry");
90 Evas_Object *obj = ewe_entry_add(win);
91
92 elm_entry_scrollable_set(obj, EINA_TRUE);
93 ck_assert_msg(ewe_entry_label_text_get(obj) == NULL, "ewe_entry_label_text_get() should return NULL if text is not set yet");
94 evas_object_del(win);
95 ewe_shutdown();
96}
97END_TEST
98
99/**
100 * @addtogroup ewe_entry_label_text
101 * @{
102 * <tr>
103 * <td>ewe_entry_label_text</td>
104 * <td>ewe_entry_label_text_test_p1</td>
105 * <td>
106 * @precondition
107 * @step 1 init ewe
108 * @step 2 create parent window
109 * @step 3 call ewe_entry_add() with proper parameter
110 * @step 4 set entry scrollable
111 * @procedure
112 * @step 1 call ewe_entry_label_text_set(obj, "TEST")
113 * @step 2 call ewe_entry_label_text_get(obj)
114 * </td>
115 * <td>(Evas_Object *) entry</td>
116 * <td>Set string should be returned</td>
117 * <td>_REAL_RESULT_</td>
118 * <td>_PASSED_</td>
119 * </tr>
120 * @}
121 */
122EWE_TEST(ewe_entry_label_text_test_p2)
123{
124 ewe_init(0, 0);
125 Evas_Object *win = elm_win_util_standard_add("entry", "Entry");
126 Evas_Object *obj = ewe_entry_add(win);
127
128 elm_entry_scrollable_set(obj, EINA_TRUE);
129 ewe_entry_label_text_set(obj, "TEST");
130 ck_assert_msg(!strcmp(ewe_entry_label_text_get(obj), "TEST"), "New label text is not set correctly");
131 evas_object_del(win);
132 ewe_shutdown();
133}
134END_TEST
135
136/**
137 * @addtogroup ewe_entry_label_text
138 * @{
139 * </TABLE>
140 * @}
141 * @}
142 */
diff --git a/tests/test_ewe_entry/ewe_entry_label_visibility.c b/tests/test_ewe_entry/ewe_entry_label_visibility.c
deleted file mode 100644
index 32f7d67..0000000
--- a/tests/test_ewe_entry/ewe_entry_label_visibility.c
+++ /dev/null
@@ -1,147 +0,0 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html.
18 */
19#include "test_ewe_entry.h"
20
21/**
22 * @addtogroup ewe_entry_test
23 * @{
24 * @addtogroup ewe_entry_label_visibility
25 * @{
26 * ewe_entry
27 * <TABLE>
28 * @}
29 */
30
31/**
32 * @addtogroup ewe_entry_label_visibility
33 * @{
34 * <tr>
35 * <td>ewe_entry_label_visibility</td>
36 * <td>ewe_entry_label_visibility_test_n</td>
37 * <td>
38 * @precondition
39 * @step 1 init ewe
40 * @step 2 create parent window
41 * @step 3 call ewe_entry_add() with proper parameter
42 * @procedure
43 * @step 1 set entrys visibility to EINA_TRUE
44 * @step 2 check its visibility
45 * </td>
46 * <td>(Evas_Object *) entry</td>
47 * <td>ewe_entry_label_visible_get() should return EINA_FALSE if Entry is not scrollable</td>
48 * <td>_REAL_RESULT_</td>
49 * <td>_PASSED_</td>
50 * </tr>
51 * @}
52 */
53EWE_TEST(ewe_entry_label_visibility_test_n)
54{
55 ewe_init(0, 0);
56 Evas_Object *win = elm_win_util_standard_add("entry", "Entry");
57 Evas_Object *obj = ewe_entry_add(win);
58 ewe_entry_label_visible_set(obj, EINA_TRUE);
59 ck_assert_msg(ewe_entry_label_visible_get(obj) == EINA_FALSE, "Visibility value should be EINA_FALSE on negative test");
60 evas_object_del(win);
61 ewe_shutdown();
62}
63END_TEST
64
65/**
66 * @addtogroup ewe_entry_label_visibility
67 * @{
68 * <tr>
69 * <td>ewe_entry_label_visibility</td>
70 * <td>ewe_entry_label_visibility_test_p1</td>
71 * <td>
72 * @precondition
73 * @step 1 init ewe
74 * @step 2 create parent window
75 * @step 3 call ewe_entry_add() with proper parameter
76 * @step 4 set entry scrollable
77 * @procedure
78 * @step 1 check if default visibility value is EINA_FALSE
79 * </td>
80 * <td>(Evas_Object *) entry</td>
81 * <td>Default visibility vale fot label should be EINA_FALSE</td>
82 * <td>_REAL_RESULT_</td>
83 * <td>_PASSED_</td>
84 * </tr>
85 * @}
86 */
87EWE_TEST(ewe_entry_label_visibility_test_p1)
88{
89 ewe_init(0, 0);
90 Evas_Object *win = elm_win_util_standard_add("entry", "Entry");
91 Evas_Object *obj = ewe_entry_add(win);
92 elm_entry_scrollable_set(obj, EINA_TRUE);
93 ck_assert_msg(ewe_entry_label_visible_get(obj) == EINA_FALSE, "Default visibility value is not correct");
94 evas_object_del(win);
95 ewe_shutdown();
96}
97END_TEST
98
99/**
100 * @addtogroup ewe_entry_label_visibility
101 * @{
102 * <tr>
103 * <td>ewe_entry_label_visibility</td>
104 * <td>ewe_entry_label_visibility_test_p2</td>
105 * <td>
106 * @precondition
107 * @step 1 init ewe
108 * @step 2 create parent window
109 * @step 3 call ewe_entry_add() with proper parameter
110 * @step 4 set entry scrollable
111 * @procedure
112 * @step 1 set label visibility to EINA_TRUE
113 * @step 2 check if label visibility changed
114 * @step 3 set label visibility to EINA_FALSE
115 * @step 4 check if label visibility changed
116 * </td>
117 * <td>(Evas_Object *) entry, EINA_TRUE</td>
118 * <td>Visibility value changed</td>
119 * <td>_REAL_RESULT_</td>
120 * <td>_PASSED_</td>
121 * </tr>
122 * @}
123 */
124EWE_TEST(ewe_entry_label_visibility_test_p2)
125{
126 ewe_init(0, 0);
127 Evas_Object *win = elm_win_util_standard_add("entry", "Entry");
128 Evas_Object *obj = ewe_entry_add(win);
129 elm_entry_scrollable_set(obj, EINA_TRUE);
130
131 ewe_entry_label_visible_set(obj, EINA_TRUE);
132 ck_assert_msg(ewe_entry_label_visible_get(obj) == EINA_TRUE, "New visibility value is not applyed correctly");
133 ewe_entry_label_visible_set(obj, EINA_FALSE);
134 ck_assert_msg(ewe_entry_label_visible_get(obj) == EINA_FALSE, "New visibility value is not applyed correctly");
135
136 evas_object_del(win);
137 ewe_shutdown();
138}
139END_TEST
140
141/**
142 * @addtogroup ewe_entry_label_visibility
143 * @{
144 * </TABLE>
145 * @}
146 * @}
147 */
diff --git a/tests/test_ewe_entry/test_ewe_entry.c b/tests/test_ewe_entry/test_ewe_entry.c
index 07fe3ad..5a1653d 100644
--- a/tests/test_ewe_entry/test_ewe_entry.c
+++ b/tests/test_ewe_entry/test_ewe_entry.c
@@ -24,12 +24,6 @@ Suite* test_suite (void) {
24 TCase *tcase = tcase_create("TCase"); 24 TCase *tcase = tcase_create("TCase");
25 tcase_add_test(tcase, ewe_entry_add_test_p); 25 tcase_add_test(tcase, ewe_entry_add_test_p);
26 tcase_add_test(tcase, ewe_entry_add_test_n); 26 tcase_add_test(tcase, ewe_entry_add_test_n);
27 tcase_add_test(tcase, ewe_entry_label_visibility_test_n);
28 tcase_add_test(tcase, ewe_entry_label_visibility_test_p1);
29 tcase_add_test(tcase, ewe_entry_label_visibility_test_p2);
30 tcase_add_test(tcase, ewe_entry_label_text_test_n);
31 tcase_add_test(tcase, ewe_entry_label_text_test_p1);
32 tcase_add_test(tcase, ewe_entry_label_text_test_p2);
33 tcase_add_test(tcase, ewe_entry_regex_set_test_n1); 27 tcase_add_test(tcase, ewe_entry_regex_set_test_n1);
34 tcase_add_test(tcase, ewe_entry_regex_set_test_n2); 28 tcase_add_test(tcase, ewe_entry_regex_set_test_n2);
35 tcase_add_test(tcase, ewe_entry_regex_set_test_n3); 29 tcase_add_test(tcase, ewe_entry_regex_set_test_n3);
diff --git a/tests/test_ewe_entry/test_ewe_entry.h b/tests/test_ewe_entry/test_ewe_entry.h
index 7719002..74f6fd2 100644
--- a/tests/test_ewe_entry/test_ewe_entry.h
+++ b/tests/test_ewe_entry/test_ewe_entry.h
@@ -27,14 +27,6 @@
27void ewe_entry_add_test_p(int); 27void ewe_entry_add_test_p(int);
28void ewe_entry_add_test_n(int); 28void ewe_entry_add_test_n(int);
29 29
30void ewe_entry_label_visibility_test_n(int);
31void ewe_entry_label_visibility_test_p1(int);
32void ewe_entry_label_visibility_test_p2(int);
33
34void ewe_entry_label_text_test_n(int);
35void ewe_entry_label_text_test_p1(int);
36void ewe_entry_label_text_test_p2(int);
37
38void ewe_entry_regex_set_test_n1(int); 30void ewe_entry_regex_set_test_n1(int);
39void ewe_entry_regex_set_test_n2(int); 31void ewe_entry_regex_set_test_n2(int);
40void ewe_entry_regex_set_test_n3(int); 32void ewe_entry_regex_set_test_n3(int);
diff --git a/tests/test_ewe_statusbar/ewe_statusbar_item_append.c b/tests/test_ewe_statusbar/ewe_statusbar_item_append.c
index a836591..ec4c6f1 100644
--- a/tests/test_ewe_statusbar/ewe_statusbar_item_append.c
+++ b/tests/test_ewe_statusbar/ewe_statusbar_item_append.c
@@ -272,7 +272,7 @@ EWE_TEST(ewe_statusbar_item_append_test_p3)
272 content = ewe_statusbar_item_content_get(sb_item); 272 content = ewe_statusbar_item_content_get(sb_item);
273 ck_assert_msg(content == progressbar, "Setted and getted item contents are " 273 ck_assert_msg(content == progressbar, "Setted and getted item contents are "
274 " not equal"); 274 " not equal");
275 evas_object_smart_callback_call(statusbar, "clicked", sb_item); 275 sb_item->func(sb_item->cb_data, sb_item->parent, sb_item);
276 ck_assert_msg(return_code == EINA_TRUE, "Something wrong with 'clicked' callback"); 276 ck_assert_msg(return_code == EINA_TRUE, "Something wrong with 'clicked' callback");
277 pb_state = elm_progressbar_value_get(progressbar); 277 pb_state = elm_progressbar_value_get(progressbar);
278 ck_assert_msg(pb_state == 0.5, "Content parameters wasn't changed"); 278 ck_assert_msg(pb_state == 0.5, "Content parameters wasn't changed");
diff --git a/tests/test_ewe_statusbar/ewe_statusbar_item_insert_after.c b/tests/test_ewe_statusbar/ewe_statusbar_item_insert_after.c
index d04f802..1055785 100644
--- a/tests/test_ewe_statusbar/ewe_statusbar_item_insert_after.c
+++ b/tests/test_ewe_statusbar/ewe_statusbar_item_insert_after.c
@@ -168,7 +168,7 @@ EWE_TEST(ewe_statusbar_item_insert_after_test_p2)
168 ck_assert_msg(ret == EINA_TRUE, "Failed to insert first item after second"); 168 ck_assert_msg(ret == EINA_TRUE, "Failed to insert first item after second");
169 items_list = ewe_statusbar_items_list_get(statusbar); 169 items_list = ewe_statusbar_items_list_get(statusbar);
170 ck_assert_msg(items_list != NULL, "List of items is NULL"); 170 ck_assert_msg(items_list != NULL, "List of items is NULL");
171 control = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_nth(items_list, 1)); 171 control = (Ewe_Statusbar_Item *)eina_list_nth(items_list, 1);
172 ck_assert_msg(item_p == control, "Second item not equal to reordered item"); 172 ck_assert_msg(item_p == control, "Second item not equal to reordered item");
173 content = ewe_statusbar_item_content_get(control); 173 content = ewe_statusbar_item_content_get(control);
174 ck_assert_msg(content == progressbar, "Setted and getted item contents are not equal"); 174 ck_assert_msg(content == progressbar, "Setted and getted item contents are not equal");
@@ -244,10 +244,10 @@ EWE_TEST(ewe_statusbar_item_insert_after_test_p3)
244 ck_assert_msg(ret == EINA_TRUE, "Failed to insert third item after first"); 244 ck_assert_msg(ret == EINA_TRUE, "Failed to insert third item after first");
245 items_list = ewe_statusbar_items_list_get(statusbar); 245 items_list = ewe_statusbar_items_list_get(statusbar);
246 ck_assert_msg(items_list != NULL, "List of items is NULL"); 246 ck_assert_msg(items_list != NULL, "List of items is NULL");
247 control = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_nth(items_list, 1)); 247 control = (Ewe_Statusbar_Item *)eina_list_nth(items_list, 1);
248 ck_assert_msg(item_p == control, "Second item not equal to reordered item"); 248 ck_assert_msg(item_l == control, "Second item not equal to reordered item");
249 content = ewe_statusbar_item_content_get(control); 249 content = ewe_statusbar_item_content_get(control);
250 ck_assert_msg(content == progressbar, "Setted and getted item contents are not equal"); 250 ck_assert_msg(content == label, "Setted and getted item contents are not equal");
251 251
252 evas_object_del(win); 252 evas_object_del(win);
253 ewe_shutdown(); 253 ewe_shutdown();
@@ -295,7 +295,6 @@ EWE_TEST(ewe_statusbar_item_insert_after_test_p4)
295 Evas_Object *statusbar = NULL; 295 Evas_Object *statusbar = NULL;
296 Evas_Object *progressbar = NULL; 296 Evas_Object *progressbar = NULL;
297 Evas_Object *label = NULL; 297 Evas_Object *label = NULL;
298 Ewe_Statusbar_Item *item_p = NULL;
299 Ewe_Statusbar_Item *item_s = NULL; 298 Ewe_Statusbar_Item *item_s = NULL;
300 Ewe_Statusbar_Item *item_l = NULL; 299 Ewe_Statusbar_Item *item_l = NULL;
301 Ewe_Statusbar_Item *control = NULL; 300 Ewe_Statusbar_Item *control = NULL;
@@ -307,7 +306,7 @@ EWE_TEST(ewe_statusbar_item_insert_after_test_p4)
307 statusbar = ewe_statusbar_add(win); 306 statusbar = ewe_statusbar_add(win);
308 progressbar = elm_progressbar_add(statusbar); 307 progressbar = elm_progressbar_add(statusbar);
309 label = elm_label_add(statusbar); 308 label = elm_label_add(statusbar);
310 item_p = ewe_statusbar_item_append(statusbar, progressbar, 309 ewe_statusbar_item_append(statusbar, progressbar,
311 EWE_STATUSBAR_ITEM_TYPE_OBJECT, NULL, NULL); 310 EWE_STATUSBAR_ITEM_TYPE_OBJECT, NULL, NULL);
312 item_s = ewe_statusbar_item_append(statusbar, NULL, 311 item_s = ewe_statusbar_item_append(statusbar, NULL,
313 EWE_STATUSBAR_ITEM_TYPE_SEPARATOR, NULL, NULL); 312 EWE_STATUSBAR_ITEM_TYPE_SEPARATOR, NULL, NULL);
@@ -319,8 +318,8 @@ EWE_TEST(ewe_statusbar_item_insert_after_test_p4)
319 items_list = ewe_statusbar_items_list_get(statusbar); 318 items_list = ewe_statusbar_items_list_get(statusbar);
320 ck_assert_msg(items_list != NULL, "List of items is NULL"); 319 ck_assert_msg(items_list != NULL, "List of items is NULL");
321 control = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_last(items_list)); 320 control = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_last(items_list));
322 ck_assert_msg(item_p == control, "Last item not equal to reordered item"); 321 ck_assert_msg(item_s == control, "Last item not equal to reordered item");
323 ck_assert_msg(control->type == EWE_STATUSBAR_ITEM_TYPE_OBJECT, 322 ck_assert_msg(control->type == EWE_STATUSBAR_ITEM_TYPE_SEPARATOR,
324 "Setted and getted items types are not equal"); 323 "Setted and getted items types are not equal");
325 324
326 evas_object_del(win); 325 evas_object_del(win);
diff --git a/tests/test_ewe_statusbar/ewe_statusbar_item_insert_before.c b/tests/test_ewe_statusbar/ewe_statusbar_item_insert_before.c
index c788fc8..c687bdc 100644
--- a/tests/test_ewe_statusbar/ewe_statusbar_item_insert_before.c
+++ b/tests/test_ewe_statusbar/ewe_statusbar_item_insert_before.c
@@ -168,7 +168,7 @@ EWE_TEST(ewe_statusbar_item_insert_before_test_p2)
168 ck_assert_msg(ret == EINA_TRUE, "Failed to insert first item before last"); 168 ck_assert_msg(ret == EINA_TRUE, "Failed to insert first item before last");
169 items_list = ewe_statusbar_items_list_get(statusbar); 169 items_list = ewe_statusbar_items_list_get(statusbar);
170 ck_assert_msg(items_list != NULL, "List of items is NULL"); 170 ck_assert_msg(items_list != NULL, "List of items is NULL");
171 control = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_nth(items_list, 1)); 171 control = (Ewe_Statusbar_Item *)eina_list_nth(items_list, 1);
172 ck_assert_msg(item_p == control, "Second item not equal to reordered item"); 172 ck_assert_msg(item_p == control, "Second item not equal to reordered item");
173 content = ewe_statusbar_item_content_get(control); 173 content = ewe_statusbar_item_content_get(control);
174 ck_assert_msg(content == progressbar, "Setted and getted item contents are not equal"); 174 ck_assert_msg(content == progressbar, "Setted and getted item contents are not equal");
@@ -244,7 +244,7 @@ EWE_TEST(ewe_statusbar_item_insert_before_test_p3)
244 ck_assert_msg(ret == EINA_TRUE, "Failed to insert third item before second"); 244 ck_assert_msg(ret == EINA_TRUE, "Failed to insert third item before second");
245 items_list = ewe_statusbar_items_list_get(statusbar); 245 items_list = ewe_statusbar_items_list_get(statusbar);
246 ck_assert_msg(items_list != NULL, "List of items is NULL"); 246 ck_assert_msg(items_list != NULL, "List of items is NULL");
247 control = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_nth(items_list, 1)); 247 control = (Ewe_Statusbar_Item *)eina_list_nth(items_list, 1);
248 ck_assert_msg(item_l == control, "Second item not equal to reordered item"); 248 ck_assert_msg(item_l == control, "Second item not equal to reordered item");
249 content = ewe_statusbar_item_content_get(control); 249 content = ewe_statusbar_item_content_get(control);
250 ck_assert_msg(content == label, "Setted and getted item contents are not equal"); 250 ck_assert_msg(content == label, "Setted and getted item contents are not equal");
@@ -319,7 +319,7 @@ EWE_TEST(ewe_statusbar_item_insert_before_test_p4)
319 ck_assert_msg(items_list != NULL, "List of items is NULL"); 319 ck_assert_msg(items_list != NULL, "List of items is NULL");
320 control = (Ewe_Statusbar_Item *)eina_list_data_get(items_list); 320 control = (Ewe_Statusbar_Item *)eina_list_data_get(items_list);
321 ck_assert_msg(item_s == control, "First item not equal to reordered item"); 321 ck_assert_msg(item_s == control, "First item not equal to reordered item");
322 ck_assert_msg(control->type == EWE_STATUSBAR_ITEM_TYPE_OBJECT, 322 ck_assert_msg(control->type == EWE_STATUSBAR_ITEM_TYPE_SEPARATOR,
323 "Setted and getted items types are not equal"); 323 "Setted and getted items types are not equal");
324 324
325 evas_object_del(win); 325 evas_object_del(win);
diff --git a/tests/test_ewe_statusbar/ewe_statusbar_item_prepend.c b/tests/test_ewe_statusbar/ewe_statusbar_item_prepend.c
index 89865a6..65f4cf7 100644
--- a/tests/test_ewe_statusbar/ewe_statusbar_item_prepend.c
+++ b/tests/test_ewe_statusbar/ewe_statusbar_item_prepend.c
@@ -106,7 +106,7 @@ EWE_TEST(ewe_statusbar_item_prepend_test_p1)
106 items_count = eina_list_count(items_list); 106 items_count = eina_list_count(items_list);
107 ck_assert_msg(items_count == 2, "Returned list contain different count of " 107 ck_assert_msg(items_count == 2, "Returned list contain different count of "
108 " setted items"); 108 " setted items");
109 sb_item_s = (Ewe_Statusbar_Item *)eina_list_data_get(eina_list_nth(items_list, 0)); 109 sb_item_s = (Ewe_Statusbar_Item *)eina_list_nth(items_list, 0);
110 ck_assert_msg(sb_item_f == sb_item_s, "Last setted and first getted items are " 110 ck_assert_msg(sb_item_f == sb_item_s, "Last setted and first getted items are "
111 " not equal"); 111 " not equal");
112 112
@@ -271,7 +271,7 @@ EWE_TEST(ewe_statusbar_item_prepend_test_p3)
271 content = ewe_statusbar_item_content_get(sb_item); 271 content = ewe_statusbar_item_content_get(sb_item);
272 ck_assert_msg(content == progressbar, "Setted and getted item contents are " 272 ck_assert_msg(content == progressbar, "Setted and getted item contents are "
273 " not equal"); 273 " not equal");
274 evas_object_smart_callback_call(statusbar, "clicked", sb_item); 274 sb_item->func(sb_item->cb_data, sb_item->parent, sb_item);
275 ck_assert_msg(return_code == EINA_TRUE, "Something wrong with 'clicked' callback"); 275 ck_assert_msg(return_code == EINA_TRUE, "Something wrong with 'clicked' callback");
276 pb_state = elm_progressbar_value_get(progressbar); 276 pb_state = elm_progressbar_value_get(progressbar);
277 ck_assert_msg(pb_state == 0.5, "Content parameters wasn't changed"); 277 ck_assert_msg(pb_state == 0.5, "Content parameters wasn't changed");
diff --git a/tests/test_ewe_tabs/ewe_tabs_item_content_get.c b/tests/test_ewe_tabs/ewe_tabs_item_content_get.c
new file mode 100644
index 0000000..52fdb74
--- /dev/null
+++ b/tests/test_ewe_tabs/ewe_tabs_item_content_get.c
@@ -0,0 +1,110 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html.
18 */
19#include "test_ewe_tabs.h"
20
21/**
22 * @addtogroup ewe_tabs_test
23 * @{
24 * @addtogroup ewe_tabs_item_content_get
25 * @{
26 * ewe_tabs
27 * <TABLE>
28 * @}
29 */
30
31/**
32 * @addtogroup ewe_tabs_item_content_get
33 * @{
34 * <tr>
35 * <td>ewe_tabs_item_content_get</td>
36 * <td>ewe_tabs_item_content_get_test_p</td>
37 * <td>
38 * @precondition
39 * @step 1 initialized ewe
40 * @step 2 parent window created
41 * @step 3 ewe_tabs added
42 * @step 4 item added to tabs
43 * @step 5 elm_label added
44 * @step 6 set label as content to item
45 *
46 * @procedure
47 * @step 1 call ewe_tabs_item_content_get
48 * @step 2 check that returned pointer is pointer to setted label
49 * </td>
50 * <td>(Evas_Object *) tabs, (Ewe_Tabs_Item *)it</td>
51 * <td>Getted content equal to setted label</td>
52 * <td>_REAL_RESULT_</td>
53 * <td>_PASSED_</td>
54 * </tr>
55 * @}
56 */
57EWE_TEST(ewe_tabs_item_content_get_test_p)
58{
59 ewe_init(0, 0);
60 Evas_Object *win = elm_win_util_standard_add("test", "test");
61 Evas_Object *tabs = ewe_tabs_add(win);
62 Ewe_Tabs_Item *it = ewe_tabs_item_append(tabs, NULL, "item", NULL);
63 Evas_Object *lbl = elm_label_add(win);
64 ewe_tabs_item_content_set(tabs, it, lbl);
65
66 ck_assert_msg(ewe_tabs_item_content_get(tabs, it) == lbl, "Wrong content returned");
67
68 evas_object_del(win);
69 ewe_shutdown();
70}
71END_TEST
72
73/**
74 * @addtogroup ewe_tabs_item_content_get
75 * @{
76 * <tr>
77 * <td>ewe_tabs_item_content_get</td>
78 * <td>ewe_tabs_item_content_get_test_n</td>
79 * <td>
80 * @precondition
81 * @step 1 initialized ewe
82 *
83 * @procedure
84 * @step 1 call ewe_tabs_item_content_get
85 * @step 2 check returned pointer
86 * </td>
87 * <td>NULL, NULL</td>
88 * <td>NULL pointer returned</td>
89 * <td>_REAL_RESULT_</td>
90 * <td>_PASSED_</td>
91 * </tr>
92 * @}
93 */
94EWE_TEST(ewe_tabs_item_content_get_test_n)
95{
96 ewe_init(0, 0);
97
98 ck_assert_msg(ewe_tabs_item_content_get(NULL, NULL) == NULL, "Content getted from NULL object");
99
100 ewe_shutdown();
101}
102END_TEST
103
104/**
105 * @addtogroup ewe_tabs_item_content_get
106 * @{
107 * </TABLE>
108 * @}
109 * @}
110 */
diff --git a/tests/test_ewe_tabs/test_ewe_tabs.c b/tests/test_ewe_tabs/test_ewe_tabs.c
index fd8b626..fdf8bf2 100644
--- a/tests/test_ewe_tabs/test_ewe_tabs.c
+++ b/tests/test_ewe_tabs/test_ewe_tabs.c
@@ -40,6 +40,8 @@ Suite* test_suite (void) {
40 tcase_add_test(tcase, ewe_tabs_item_content_set_test_n2); 40 tcase_add_test(tcase, ewe_tabs_item_content_set_test_n2);
41 tcase_add_test(tcase, ewe_tabs_item_content_unset_test_p); 41 tcase_add_test(tcase, ewe_tabs_item_content_unset_test_p);
42 tcase_add_test(tcase, ewe_tabs_item_content_unset_test_n); 42 tcase_add_test(tcase, ewe_tabs_item_content_unset_test_n);
43 tcase_add_test(tcase, ewe_tabs_item_content_get_test_p);
44 tcase_add_test(tcase, ewe_tabs_item_content_get_test_n);
43 tcase_add_test(tcase, ewe_tabs_item_button_set_test_p); 45 tcase_add_test(tcase, ewe_tabs_item_button_set_test_p);
44 tcase_add_test(tcase, ewe_tabs_item_button_set_test_n1); 46 tcase_add_test(tcase, ewe_tabs_item_button_set_test_n1);
45 tcase_add_test(tcase, ewe_tabs_item_button_set_test_n2); 47 tcase_add_test(tcase, ewe_tabs_item_button_set_test_n2);
diff --git a/tests/test_ewe_tabs/test_ewe_tabs.h b/tests/test_ewe_tabs/test_ewe_tabs.h
index 1dab479..8a00d12 100644
--- a/tests/test_ewe_tabs/test_ewe_tabs.h
+++ b/tests/test_ewe_tabs/test_ewe_tabs.h
@@ -49,6 +49,9 @@ void ewe_tabs_item_content_set_test_n2(int);
49void ewe_tabs_item_content_unset_test_p(int); 49void ewe_tabs_item_content_unset_test_p(int);
50void ewe_tabs_item_content_unset_test_n(int); 50void ewe_tabs_item_content_unset_test_n(int);
51 51
52void ewe_tabs_item_content_get_test_p(int);
53void ewe_tabs_item_content_get_test_n(int);
54
52void ewe_tabs_item_button_set_test_p(int); 55void ewe_tabs_item_button_set_test_p(int);
53void ewe_tabs_item_button_set_test_n1(int); 56void ewe_tabs_item_button_set_test_n1(int);
54void ewe_tabs_item_button_set_test_n2(int); 57void ewe_tabs_item_button_set_test_n2(int);