summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-01-31 13:35:34 +0900
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-01-31 14:59:37 +0900
commit5525c89a3d1091cd17c5df6fbdc7378f0d0b4ff3 (patch)
tree16e710a757db55ef1f6de3201b5f4542de3a7680 /src/tests
parentc713bb90d3fe4a56ebd5f4f88cd5a248c5b7e482 (diff)
efl_model : rename all efl_model based classes.
Summary: As the result of discussion in T7458, we need to rename all efl_model based classes with efl_XXX_Model sequence. I've run few vote for this, see V42, V43 few classes are totally renamed as our consideration of misnaming. | Efl.Model_Loop | Efl.Loop_Model | | Efl.Model_Item | Efl.Generic_Model | | Efl.Model_Container | Efl.Container_Model | | Efl.Model_Container_Item | Efl.Container_Model_Item | | Efl.Model_Composite | Efl.Composite_Model | | Efl.Model_Composite_Boolean | Efl.Boolean_Model | | Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item | | Efl.Model_Composite_Selection | Efl.Select_Model | | Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item | | Efl.Model_View | Efl.View_Model | | Eio.Model | Efl.Io.Model | | Efl.Ui.Model_State | Efl.Ui.State_Model | | Efl.Ui.Model_Size | Efl.Ui.Size_Model | | Efl.Ui.Model_Exact | Efl.Ui.Exact_Model | | Efl.Ui.Model_Average | Efl.Ui.Average_Model | | Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model | I worried about Efl.Io.Model changes, cause it is widely used, but as I tested, there is no issue found yet. Eldbus.Model also may can changed Efl.Dbus.Model, but I cannot found any class who using Efl.Dbus namespace, so I left it future work. Test Plan: Run the Make Test, it works well except Efl test about selection. there are class inheritance problem exist in select_model, I reported it and will fix it in another patch. Reviewers: cedric, felipealmeida, woohyun, Hermet Reviewed By: cedric Subscribers: lauromoura Tags: #efl, #do_not_merge Differential Revision: https://phab.enlightenment.org/D7533
Diffstat (limited to '')
-rw-r--r--src/tests/efl/efl_suite.c6
-rw-r--r--src/tests/efl/efl_suite.h6
-rw-r--r--src/tests/efl/efl_test_composite_model.c (renamed from src/tests/efl/efl_test_model_composite.c)30
-rw-r--r--src/tests/efl/efl_test_container_model.c (renamed from src/tests/efl/efl_test_model_container.c)14
-rw-r--r--src/tests/efl/efl_test_view_model.c (renamed from src/tests/efl/efl_test_model_view.c)58
-rw-r--r--src/tests/efl/meson.build6
-rw-r--r--src/tests/eio/efl_io_model_test_file.c (renamed from src/tests/eio/eio_model_test_file.c)10
-rw-r--r--src/tests/eio/efl_io_model_test_monitor_add.c (renamed from src/tests/eio/eio_model_test_monitor_add.c)10
-rw-r--r--src/tests/eio/eio_suite.c4
-rw-r--r--src/tests/eio/eio_suite.h4
-rw-r--r--src/tests/eio/meson.build4
-rw-r--r--src/tests/elementary/efl_ui_model.c34
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c4
13 files changed, 95 insertions, 95 deletions
diff --git a/src/tests/efl/efl_suite.c b/src/tests/efl/efl_suite.c
index 97b17d7b2d..4385b82f72 100644
--- a/src/tests/efl/efl_suite.c
+++ b/src/tests/efl/efl_suite.c
@@ -26,9 +26,9 @@
26#include "../efl_check.h" 26#include "../efl_check.h"
27 27
28static const Efl_Test_Case etc[] = { 28static const Efl_Test_Case etc[] = {
29 { "Efl_Model_Container", efl_test_case_model_container }, 29 { "Efl_Container_Model", efl_test_case_container_model },
30 { "Efl_Model_View", efl_test_case_model_view }, 30 { "Efl_View_Model", efl_test_case_view_model },
31 { "Efl_Model_Composite_Boolean", efl_test_case_model_composite_boolean }, 31 { "Efl_Boolean_Model", efl_test_case_boolean_model },
32 { NULL, NULL } 32 { NULL, NULL }
33}; 33};
34 34
diff --git a/src/tests/efl/efl_suite.h b/src/tests/efl/efl_suite.h
index e353395ffb..4a670deab9 100644
--- a/src/tests/efl/efl_suite.h
+++ b/src/tests/efl/efl_suite.h
@@ -21,8 +21,8 @@
21 21
22#include <check.h> 22#include <check.h>
23#include "../efl_check.h" 23#include "../efl_check.h"
24void efl_test_case_model_container(TCase *tc); 24void efl_test_case_container_model(TCase *tc);
25void efl_test_case_model_view(TCase *tc); 25void efl_test_case_view_model(TCase *tc);
26void efl_test_case_model_composite_boolean(TCase *tc); 26void efl_test_case_boolean_model(TCase *tc);
27 27
28#endif /* EFL_SUITE_H_ */ 28#endif /* EFL_SUITE_H_ */
diff --git a/src/tests/efl/efl_test_model_composite.c b/src/tests/efl/efl_test_composite_model.c
index f48127acb4..cfe56c135f 100644
--- a/src/tests/efl/efl_test_model_composite.c
+++ b/src/tests/efl/efl_test_composite_model.c
@@ -103,17 +103,17 @@ _selection_children_slice_get_then(void *data EINA_UNUSED,
103 return v; 103 return v;
104} 104}
105 105
106EFL_START_TEST(efl_test_model_composite_boolean) 106EFL_START_TEST(efl_test_boolean_model)
107{ 107{
108 Efl_Model_Item *base_model, *child; 108 Efl_Generic_Model *base_model, *child;
109 int i; 109 int i;
110 Eina_Value v; 110 Eina_Value v;
111 Efl_Model_Composite_Boolean *model; 111 Efl_Boolean_Model *model;
112 Eina_Future *future; 112 Eina_Future *future;
113 113
114 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 114 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
115 115
116 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, efl_main_loop_get()); 116 base_model = efl_add_ref(EFL_GENERIC_MODEL_CLASS, efl_main_loop_get());
117 ck_assert(!!base_model); 117 ck_assert(!!base_model);
118 118
119 for (i = 0; i < child_number; ++i) 119 for (i = 0; i < child_number; ++i)
@@ -124,10 +124,10 @@ EFL_START_TEST(efl_test_model_composite_boolean)
124 efl_model_property_set(child, "test_p_int", &v); 124 efl_model_property_set(child, "test_p_int", &v);
125 } 125 }
126 126
127 model = efl_add_ref(EFL_MODEL_COMPOSITE_BOOLEAN_CLASS, efl_main_loop_get(), 127 model = efl_add_ref(EFL_BOOLEAN_MODEL_CLASS, efl_main_loop_get(),
128 efl_ui_view_model_set(efl_added, base_model), 128 efl_ui_view_model_set(efl_added, base_model),
129 efl_model_composite_boolean_add(efl_added, "test_p_true", EINA_TRUE), 129 efl_boolean_model_boolean_add(efl_added, "test_p_true", EINA_TRUE),
130 efl_model_composite_boolean_add(efl_added, "test_p_false", EINA_FALSE)); 130 efl_boolean_model_boolean_add(efl_added, "test_p_false", EINA_FALSE));
131 ck_assert(!!model); 131 ck_assert(!!model);
132 132
133 future = efl_model_children_slice_get(model, 0, efl_model_children_count_get(model)); 133 future = efl_model_children_slice_get(model, 0, efl_model_children_count_get(model));
@@ -146,17 +146,17 @@ _wait_propagate(void *data EINA_UNUSED,
146 return v; 146 return v;
147} 147}
148 148
149EFL_START_TEST(efl_test_model_composite_selection) 149EFL_START_TEST(efl_test_select_model)
150{ 150{
151 Efl_Model_Item *base_model, *child; 151 Efl_Generic_Model *base_model, *child;
152 int i; 152 int i;
153 Eina_Value v; 153 Eina_Value v;
154 Efl_Model_Composite_Selection *model; 154 Efl_Select_Model *model;
155 Eina_Future *future; 155 Eina_Future *future;
156 156
157 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 157 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
158 158
159 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, efl_main_loop_get()); 159 base_model = efl_add_ref(EFL_GENERIC_MODEL_CLASS, efl_main_loop_get());
160 ck_assert(!!base_model); 160 ck_assert(!!base_model);
161 161
162 for (i = 0; i < child_number; ++i) 162 for (i = 0; i < child_number; ++i)
@@ -167,7 +167,7 @@ EFL_START_TEST(efl_test_model_composite_selection)
167 efl_model_property_set(child, "test_p_int", &v); 167 efl_model_property_set(child, "test_p_int", &v);
168 } 168 }
169 169
170 model = efl_add_ref(EFL_MODEL_COMPOSITE_SELECTION_CLASS, efl_main_loop_get(), 170 model = efl_add_ref(EFL_SELECT_MODEL_CLASS, efl_main_loop_get(),
171 efl_ui_view_model_set(efl_added, base_model)); 171 efl_ui_view_model_set(efl_added, base_model));
172 ck_assert(!!model); 172 ck_assert(!!model);
173 future = efl_model_property_set(model, "child.selected", eina_value_int_new(2)); 173 future = efl_model_property_set(model, "child.selected", eina_value_int_new(2));
@@ -182,8 +182,8 @@ EFL_START_TEST(efl_test_model_composite_selection)
182EFL_END_TEST 182EFL_END_TEST
183 183
184void 184void
185efl_test_case_model_composite_boolean(TCase *tc) 185efl_test_case_boolean_model(TCase *tc)
186{ 186{
187 tcase_add_test(tc, efl_test_model_composite_boolean); 187 tcase_add_test(tc, efl_test_boolean_model);
188 tcase_add_test(tc, efl_test_model_composite_selection); 188 tcase_add_test(tc, efl_test_select_model);
189} 189}
diff --git a/src/tests/efl/efl_test_model_container.c b/src/tests/efl/efl_test_container_model.c
index dbe76d8e4f..6bf2f40309 100644
--- a/src/tests/efl/efl_test_model_container.c
+++ b/src/tests/efl/efl_test_container_model.c
@@ -72,9 +72,9 @@ _children_slice_future_then(void *data EINA_UNUSED,
72 return v; 72 return v;
73} 73}
74 74
75EFL_START_TEST(efl_test_model_container_values) 75EFL_START_TEST(efl_test_container_model_values)
76{ 76{
77 Efl_Model_Container* model; 77 Efl_Container_Model* model;
78 Eina_Future *future; 78 Eina_Future *future;
79 int **cmp_int; 79 int **cmp_int;
80 const char **cmp_str; 80 const char **cmp_str;
@@ -89,12 +89,12 @@ EFL_START_TEST(efl_test_model_container_values)
89 cmp_str[i] = strdup(base_str[i]); 89 cmp_str[i] = strdup(base_str[i]);
90 } 90 }
91 91
92 model = efl_add_ref(EFL_MODEL_CONTAINER_CLASS, NULL); 92 model = efl_add_ref(EFL_CONTAINER_MODEL_CLASS, NULL);
93 93
94 efl_model_container_child_property_add(model, "test_p_int", EINA_VALUE_TYPE_INT, 94 efl_container_model_child_property_add(model, "test_p_int", EINA_VALUE_TYPE_INT,
95 eina_carray_iterator_new((void**)cmp_int)); 95 eina_carray_iterator_new((void**)cmp_int));
96 96
97 efl_model_container_child_property_add(model, "test_p_str", EINA_VALUE_TYPE_STRING, 97 efl_container_model_child_property_add(model, "test_p_str", EINA_VALUE_TYPE_STRING,
98 eina_carray_iterator_new((void**)cmp_str)); 98 eina_carray_iterator_new((void**)cmp_str));
99 99
100 for (i = 0; i < 7; ++i) 100 for (i = 0; i < 7; ++i)
@@ -115,7 +115,7 @@ EFL_END_TEST
115 115
116 116
117void 117void
118efl_test_case_model_container(TCase *tc) 118efl_test_case_container_model(TCase *tc)
119{ 119{
120 tcase_add_test(tc, efl_test_model_container_values); 120 tcase_add_test(tc, efl_test_container_model_values);
121} 121}
diff --git a/src/tests/efl/efl_test_model_view.c b/src/tests/efl/efl_test_view_model.c
index fead57cae7..3153d62343 100644
--- a/src/tests/efl/efl_test_model_view.c
+++ b/src/tests/efl/efl_test_view_model.c
@@ -27,11 +27,11 @@
27 27
28static const int child_number = 3; 28static const int child_number = 3;
29static const int base_ints[] = { 41, 42, 43 }; 29static const int base_ints[] = { 41, 42, 43 };
30static const char *_efl_test_model_view_label_format = "Index %i."; 30static const char *_efl_test_view_model_label_format = "Index %i.";
31static const char *dependences[] = { "test_p_int" }; 31static const char *dependences[] = { "test_p_int" };
32 32
33static Eina_Value * 33static Eina_Value *
34_efl_test_model_view_label_get(void *data, const Efl_Model_View *mv, Eina_Stringshare *property) 34_efl_test_view_model_label_get(void *data, const Efl_View_Model *mv, Eina_Stringshare *property)
35{ 35{
36 Eina_Strbuf *buf; 36 Eina_Strbuf *buf;
37 Eina_Value *r; 37 Eina_Value *r;
@@ -54,19 +54,19 @@ _efl_test_model_view_label_get(void *data, const Efl_Model_View *mv, Eina_String
54} 54}
55 55
56static Eina_Future * 56static Eina_Future *
57_efl_test_model_view_label_set(void *data EINA_UNUSED, Efl_Model_View *mv, Eina_Stringshare *property EINA_UNUSED, Eina_Value *value EINA_UNUSED) 57_efl_test_view_model_label_set(void *data EINA_UNUSED, Efl_View_Model *mv, Eina_Stringshare *property EINA_UNUSED, Eina_Value *value EINA_UNUSED)
58{ 58{
59 return efl_loop_future_rejected(mv, EFL_MODEL_ERROR_READ_ONLY); 59 return efl_loop_future_rejected(mv, EFL_MODEL_ERROR_READ_ONLY);
60} 60}
61 61
62static void 62static void
63_efl_test_model_view_label_clean(void *data) 63_efl_test_view_model_label_clean(void *data)
64{ 64{
65 ck_assert_ptr_eq(data, _efl_test_model_view_label_format); 65 ck_assert_ptr_eq(data, _efl_test_view_model_label_format);
66} 66}
67 67
68static Eina_Value * 68static Eina_Value *
69_efl_test_model_view_color_get(void *data EINA_UNUSED, const Efl_Model_View *mv, Eina_Stringshare *property) 69_efl_test_view_model_color_get(void *data EINA_UNUSED, const Efl_View_Model *mv, Eina_Stringshare *property)
70{ 70{
71 Eina_Strbuf *buf; 71 Eina_Strbuf *buf;
72 Eina_Value *r; 72 Eina_Value *r;
@@ -88,13 +88,13 @@ _efl_test_model_view_color_get(void *data EINA_UNUSED, const Efl_Model_View *mv,
88} 88}
89 89
90static Eina_Future * 90static Eina_Future *
91_efl_test_model_view_color_set(void *data EINA_UNUSED, Efl_Model_View *mv, Eina_Stringshare *property EINA_UNUSED, Eina_Value *value EINA_UNUSED) 91_efl_test_view_model_color_set(void *data EINA_UNUSED, Efl_View_Model *mv, Eina_Stringshare *property EINA_UNUSED, Eina_Value *value EINA_UNUSED)
92{ 92{
93 return efl_loop_future_rejected(mv, EFL_MODEL_ERROR_READ_ONLY); 93 return efl_loop_future_rejected(mv, EFL_MODEL_ERROR_READ_ONLY);
94} 94}
95 95
96static void 96static void
97_efl_test_model_view_color_clean(void *data EINA_UNUSED) 97_efl_test_view_model_color_clean(void *data EINA_UNUSED)
98{ 98{
99} 99}
100 100
@@ -156,7 +156,7 @@ _properties_changed(void *data, const Efl_Event *event)
156} 156}
157 157
158static Eina_Value 158static Eina_Value
159_efl_test_model_view_child_get(Eo *obj EINA_UNUSED, 159_efl_test_view_model_child_get(Eo *obj EINA_UNUSED,
160 void *data EINA_UNUSED, 160 void *data EINA_UNUSED,
161 const Eina_Value v) 161 const Eina_Value v)
162{ 162{
@@ -212,7 +212,7 @@ _efl_test_model_view_child_get(Eo *obj EINA_UNUSED,
212} 212}
213 213
214static Eina_Value 214static Eina_Value
215_efl_test_model_view_child_fetch(Eo *mv, 215_efl_test_view_model_child_fetch(Eo *mv,
216 void *data EINA_UNUSED, 216 void *data EINA_UNUSED,
217 const Eina_Value v EINA_UNUSED) 217 const Eina_Value v EINA_UNUSED)
218{ 218{
@@ -223,7 +223,7 @@ _efl_test_model_view_child_fetch(Eo *mv,
223} 223}
224 224
225static Eina_Value 225static Eina_Value
226_efl_test_model_view_child_updated_get(Eo *obj EINA_UNUSED, 226_efl_test_view_model_child_updated_get(Eo *obj EINA_UNUSED,
227 void *data EINA_UNUSED, 227 void *data EINA_UNUSED,
228 const Eina_Value v) 228 const Eina_Value v)
229{ 229{
@@ -258,7 +258,7 @@ _efl_test_model_view_child_updated_get(Eo *obj EINA_UNUSED,
258} 258}
259 259
260static Eina_Value 260static Eina_Value
261_efl_test_model_view_tests_end(Eo *obj, 261_efl_test_view_model_tests_end(Eo *obj,
262 void *data EINA_UNUSED, 262 void *data EINA_UNUSED,
263 const Eina_Value v) 263 const Eina_Value v)
264{ 264{
@@ -266,14 +266,14 @@ _efl_test_model_view_tests_end(Eo *obj,
266 return v; 266 return v;
267} 267}
268 268
269EFL_START_TEST(efl_test_model_view) 269EFL_START_TEST(efl_test_view_model)
270{ 270{
271 Efl_Model_Item *base_model, *child, *mv; 271 Efl_Generic_Model *base_model, *child, *mv;
272 Eina_Future *f; 272 Eina_Future *f;
273 int i; 273 int i;
274 Eina_Value v; 274 Eina_Value v;
275 275
276 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, efl_main_loop_get()); 276 base_model = efl_add_ref(EFL_GENERIC_MODEL_CLASS, efl_main_loop_get());
277 ck_assert(!!base_model); 277 ck_assert(!!base_model);
278 278
279 for (i = 0; i < child_number; ++i) 279 for (i = 0; i < child_number; ++i)
@@ -284,33 +284,33 @@ EFL_START_TEST(efl_test_model_view)
284 efl_model_property_set(child, "test_p_int", &v); 284 efl_model_property_set(child, "test_p_int", &v);
285 } 285 }
286 286
287 mv = efl_add_ref(EFL_MODEL_VIEW_CLASS, efl_main_loop_get(), 287 mv = efl_add_ref(EFL_VIEW_MODEL_CLASS, efl_main_loop_get(),
288 efl_ui_view_model_set(efl_added, base_model)); 288 efl_ui_view_model_set(efl_added, base_model));
289 ck_assert(!!mv); 289 ck_assert(!!mv);
290 290
291 efl_model_view_property_logic_add(mv, "label", 291 efl_view_model_property_logic_add(mv, "label",
292 (void*) _efl_test_model_view_label_format, _efl_test_model_view_label_get, _efl_test_model_view_label_clean, 292 (void*) _efl_test_view_model_label_format, _efl_test_view_model_label_get, _efl_test_view_model_label_clean,
293 (void*) _efl_test_model_view_label_format, _efl_test_model_view_label_set, _efl_test_model_view_label_clean, 293 (void*) _efl_test_view_model_label_format, _efl_test_view_model_label_set, _efl_test_view_model_label_clean,
294 EINA_C_ARRAY_ITERATOR_NEW(dependences)); 294 EINA_C_ARRAY_ITERATOR_NEW(dependences));
295 295
296 efl_model_view_property_logic_add(mv, "color", 296 efl_view_model_property_logic_add(mv, "color",
297 NULL, _efl_test_model_view_color_get, _efl_test_model_view_color_clean, 297 NULL, _efl_test_view_model_color_get, _efl_test_view_model_color_clean,
298 NULL, _efl_test_model_view_color_set, _efl_test_model_view_color_clean, 298 NULL, _efl_test_view_model_color_set, _efl_test_view_model_color_clean,
299 EINA_C_ARRAY_ITERATOR_NEW(dependences)); 299 EINA_C_ARRAY_ITERATOR_NEW(dependences));
300 300
301 efl_model_view_property_logic_add(mv, "deadend", 301 efl_view_model_property_logic_add(mv, "deadend",
302 NULL, NULL, NULL, 302 NULL, NULL, NULL,
303 NULL, NULL, NULL, 303 NULL, NULL, NULL,
304 NULL); 304 NULL);
305 305
306 f = efl_model_children_slice_get(mv, 0, efl_model_children_count_get(mv)); 306 f = efl_model_children_slice_get(mv, 0, efl_model_children_count_get(mv));
307 f = efl_future_then(mv, f, .success_type = EINA_VALUE_TYPE_ARRAY, 307 f = efl_future_then(mv, f, .success_type = EINA_VALUE_TYPE_ARRAY,
308 .success = _efl_test_model_view_child_get); 308 .success = _efl_test_view_model_child_get);
309 f = efl_future_then(mv, f, .success = _efl_test_model_view_child_fetch); 309 f = efl_future_then(mv, f, .success = _efl_test_view_model_child_fetch);
310 f = efl_future_then(mv, f, .success_type = EINA_VALUE_TYPE_ARRAY, 310 f = efl_future_then(mv, f, .success_type = EINA_VALUE_TYPE_ARRAY,
311 .success = _efl_test_model_view_child_updated_get); 311 .success = _efl_test_view_model_child_updated_get);
312 f = efl_future_then(mv, f, .success_type = EINA_VALUE_TYPE_INT, 312 f = efl_future_then(mv, f, .success_type = EINA_VALUE_TYPE_INT,
313 .success = _efl_test_model_view_tests_end); 313 .success = _efl_test_view_model_tests_end);
314 314
315 // And run ! 315 // And run !
316 ecore_main_loop_begin(); 316 ecore_main_loop_begin();
@@ -321,7 +321,7 @@ EFL_START_TEST(efl_test_model_view)
321EFL_END_TEST 321EFL_END_TEST
322 322
323void 323void
324efl_test_case_model_view(TCase *tc) 324efl_test_case_view_model(TCase *tc)
325{ 325{
326 tcase_add_test(tc, efl_test_model_view); 326 tcase_add_test(tc, efl_test_view_model);
327} 327}
diff --git a/src/tests/efl/meson.build b/src/tests/efl/meson.build
index d036b9af8d..6bd1353804 100644
--- a/src/tests/efl/meson.build
+++ b/src/tests/efl/meson.build
@@ -1,9 +1,9 @@
1efl_suite_src = [ 1efl_suite_src = [
2 'efl_suite.c', 2 'efl_suite.c',
3 'efl_suite.h', 3 'efl_suite.h',
4 'efl_test_model_composite.c', 4 'efl_test_composite_model.c',
5 'efl_test_model_container.c', 5 'efl_test_container_model.c',
6 'efl_test_model_view.c' 6 'efl_test_view_model.c'
7] 7]
8 8
9efl_suite_bin = executable('efl_suite', 9efl_suite_bin = executable('efl_suite',
diff --git a/src/tests/eio/eio_model_test_file.c b/src/tests/eio/efl_io_model_test_file.c
index 53e941fe2c..f714761c66 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/efl_io_model_test_file.c
@@ -158,7 +158,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(model,
158 { EFL_MODEL_EVENT_PROPERTIES_CHANGED, _property_changed }, 158 { EFL_MODEL_EVENT_PROPERTIES_CHANGED, _property_changed },
159 { EFL_MODEL_EVENT_CHILD_ADDED, _child_added }) 159 { EFL_MODEL_EVENT_CHILD_ADDED, _child_added })
160 160
161EFL_START_TEST(eio_model_test_test_file) 161EFL_START_TEST(efl_io_model_test_test_file)
162{ 162{
163 Eo *filemodel = NULL; 163 Eo *filemodel = NULL;
164 Eina_Value *result; 164 Eina_Value *result;
@@ -166,8 +166,8 @@ EFL_START_TEST(eio_model_test_test_file)
166 166
167 memset(&reqs, 0, sizeof(struct reqs_t)); 167 memset(&reqs, 0, sizeof(struct reqs_t));
168 168
169 filemodel = efl_add(EIO_MODEL_CLASS, efl_main_loop_get(), 169 filemodel = efl_add(EFL_IO_MODEL_CLASS, efl_main_loop_get(),
170 eio_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH)); 170 efl_io_model_path_set(efl_added, EFL_MODEL_TEST_FILENAME_PATH));
171 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 171 fail_if(!filemodel, "ERROR: Cannot init model!\n");
172 172
173 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); 173 handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
@@ -196,7 +196,7 @@ EFL_START_TEST(eio_model_test_test_file)
196EFL_END_TEST 196EFL_END_TEST
197 197
198void 198void
199eio_model_test_file(TCase *tc) 199efl_io_model_test_file(TCase *tc)
200{ 200{
201 tcase_add_test(tc, eio_model_test_test_file); 201 tcase_add_test(tc, efl_io_model_test_test_file);
202} 202}
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/efl_io_model_test_monitor_add.c
index fb1edbdd01..7fee539015 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/efl_io_model_test_monitor_add.c
@@ -92,15 +92,15 @@ _children_added_cb(void *d EINA_UNUSED, const Efl_Event* event)
92 eina_future_then(future, _children_get, event->object, NULL); 92 eina_future_then(future, _children_get, event->object, NULL);
93} 93}
94 94
95EFL_START_TEST(eio_model_test_test_monitor_add) 95EFL_START_TEST(efl_io_model_test_test_monitor_add)
96{ 96{
97 Eo *filemodel = NULL; 97 Eo *filemodel = NULL;
98 98
99 tmpdir = eina_environment_tmp_get(); 99 tmpdir = eina_environment_tmp_get();
100 100
101 filemodel = efl_add(EIO_MODEL_CLASS, 101 filemodel = efl_add(EFL_IO_MODEL_CLASS,
102 efl_main_loop_get(), 102 efl_main_loop_get(),
103 eio_model_path_set(efl_added, tmpdir)); 103 efl_io_model_path_set(efl_added, tmpdir));
104 fail_if(!filemodel, "ERROR: Cannot init model!\n"); 104 fail_if(!filemodel, "ERROR: Cannot init model!\n");
105 105
106 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel); 106 efl_event_callback_add(filemodel, EFL_MODEL_EVENT_CHILD_ADDED, &_children_added_cb, filemodel);
@@ -115,7 +115,7 @@ EFL_START_TEST(eio_model_test_test_monitor_add)
115EFL_END_TEST 115EFL_END_TEST
116 116
117void 117void
118eio_model_test_monitor_add(TCase *tc) 118efl_io_model_test_monitor_add(TCase *tc)
119{ 119{
120 tcase_add_test(tc, eio_model_test_test_monitor_add); 120 tcase_add_test(tc, efl_io_model_test_test_monitor_add);
121} 121}
diff --git a/src/tests/eio/eio_suite.c b/src/tests/eio/eio_suite.c
index 45ea556639..59579f06d8 100644
--- a/src/tests/eio/eio_suite.c
+++ b/src/tests/eio/eio_suite.c
@@ -24,8 +24,8 @@ static const Efl_Test_Case etc[] = {
24 {"Eio", eio_test_init}, 24 {"Eio", eio_test_init},
25 {"Eio_Monitor", eio_test_monitor}, 25 {"Eio_Monitor", eio_test_monitor},
26 {"Eio_Sentry", eio_test_sentry}, 26 {"Eio_Sentry", eio_test_sentry},
27 {"Eio Model", eio_model_test_file}, 27 {"Efl Io Model", efl_io_model_test_file},
28 {"Eio Model Monitor", eio_model_test_monitor_add}, 28 {"Efl Io Model Monitor", efl_io_model_test_monitor_add},
29 {"Eio File", eio_test_file}, 29 {"Eio File", eio_test_file},
30 {"Eio Job", eio_test_job}, 30 {"Eio Job", eio_test_job},
31#ifdef XATTR_TEST_DIR 31#ifdef XATTR_TEST_DIR
diff --git a/src/tests/eio/eio_suite.h b/src/tests/eio/eio_suite.h
index 4f66cbc86b..46347823ba 100644
--- a/src/tests/eio/eio_suite.h
+++ b/src/tests/eio/eio_suite.h
@@ -5,8 +5,8 @@
5#include "../efl_check.h" 5#include "../efl_check.h"
6void eio_test_monitor(TCase *tc); 6void eio_test_monitor(TCase *tc);
7void eio_test_sentry(TCase *tc); 7void eio_test_sentry(TCase *tc);
8void eio_model_test_file(TCase *tc); 8void efl_io_model_test_file(TCase *tc);
9void eio_model_test_monitor_add(TCase *tc); 9void efl_io_model_test_monitor_add(TCase *tc);
10void eio_test_file(TCase *tc); 10void eio_test_file(TCase *tc);
11void eio_test_job(TCase *tc); 11void eio_test_job(TCase *tc);
12void eio_test_job_xattr(TCase *tc); 12void eio_test_job_xattr(TCase *tc);
diff --git a/src/tests/eio/meson.build b/src/tests/eio/meson.build
index 09feb3769b..516ac2417d 100644
--- a/src/tests/eio/meson.build
+++ b/src/tests/eio/meson.build
@@ -1,7 +1,7 @@
1eio_suite_src = [ 1eio_suite_src = [
2 'eio_suite.c', 2 'eio_suite.c',
3 'eio_model_test_file.c', 3 'efl_io_model_test_file.c',
4 'eio_model_test_monitor_add.c', 4 'efl_io_model_test_monitor_add.c',
5 'eio_test_monitor.c', 5 'eio_test_monitor.c',
6 'eio_test_sentry.c', 6 'eio_test_sentry.c',
7 'eio_test_file.c', 7 'eio_test_file.c',
diff --git a/src/tests/elementary/efl_ui_model.c b/src/tests/elementary/efl_ui_model.c
index f94642f9e3..8b1d87c5d4 100644
--- a/src/tests/elementary/efl_ui_model.c
+++ b/src/tests/elementary/efl_ui_model.c
@@ -3,9 +3,9 @@
3#endif 3#endif
4 4
5#include "efl_ui_suite.h" 5#include "efl_ui_suite.h"
6#include "efl_ui_model_homogeneous.eo.h" 6#include "efl_ui_homogeneous_model.eo.h"
7#include "efl_ui_model_exact.eo.h" 7#include "efl_ui_exact_model.eo.h"
8#include "efl_ui_model_average.eo.h" 8#include "efl_ui_average_model.eo.h"
9 9
10static const int child_number = 3; 10static const int child_number = 3;
11static const int base_ints[] = { 41, 42, 43 }; 11static const int base_ints[] = { 41, 42, 43 };
@@ -14,13 +14,13 @@ static int expected_average[] = { 0, 0, 0 };
14static Efl_Model * 14static Efl_Model *
15_generate_base_model(void) 15_generate_base_model(void)
16{ 16{
17 Efl_Model_Item *base_model, *child; 17 Efl_Generic_Model *base_model, *child;
18 Eina_Value v; 18 Eina_Value v;
19 int i; 19 int i;
20 20
21 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 21 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
22 22
23 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, efl_main_loop_get()); 23 base_model = efl_add_ref(EFL_GENERIC_MODEL_CLASS, efl_main_loop_get());
24 ck_assert(!!base_model); 24 ck_assert(!!base_model);
25 for (i = 0; i < child_number; ++i) 25 for (i = 0; i < child_number; ++i)
26 { 26 {
@@ -148,16 +148,16 @@ _children_homogeneous_slice_get_then(Efl_Model *model, void *data EINA_UNUSED, c
148 return eina_future_as_value(f); 148 return eina_future_as_value(f);
149} 149}
150 150
151EFL_START_TEST(efl_ui_model_homogeneous_test) 151EFL_START_TEST(efl_ui_homogeneous_model_test)
152{ 152{
153 Efl_Model_Item *base_model, *model; 153 Efl_Generic_Model *base_model, *model;
154 Eina_Value *ret__; 154 Eina_Value *ret__;
155 Eina_Future *future; 155 Eina_Future *future;
156 int real__; 156 int real__;
157 157
158 base_model = _generate_base_model(); 158 base_model = _generate_base_model();
159 159
160 model = efl_add_ref(EFL_UI_MODEL_HOMOGENEOUS_CLASS, efl_main_loop_get(), 160 model = efl_add_ref(EFL_UI_HOMOGENEOUS_MODEL_CLASS, efl_main_loop_get(),
161 efl_ui_view_model_set(efl_added, base_model)); 161 efl_ui_view_model_set(efl_added, base_model));
162 ck_assert(!!model); 162 ck_assert(!!model);
163 163
@@ -219,16 +219,16 @@ _children_exact_slice_get_then(Efl_Model *model, void *data EINA_UNUSED, const E
219 return eina_future_as_value(f); 219 return eina_future_as_value(f);
220} 220}
221 221
222EFL_START_TEST(efl_ui_model_exact_test) 222EFL_START_TEST(efl_ui_exact_model_test)
223{ 223{
224 Efl_Model_Item *base_model, *model; 224 Efl_Generic_Model *base_model, *model;
225 Eina_Future *future; 225 Eina_Future *future;
226 Eina_Value *ret__; 226 Eina_Value *ret__;
227 int real__; 227 int real__;
228 228
229 base_model = _generate_base_model(); 229 base_model = _generate_base_model();
230 230
231 model = efl_add_ref(EFL_UI_MODEL_EXACT_CLASS, efl_main_loop_get(), 231 model = efl_add_ref(EFL_UI_EXACT_MODEL_CLASS, efl_main_loop_get(),
232 efl_ui_view_model_set(efl_added, base_model)); 232 efl_ui_view_model_set(efl_added, base_model));
233 ck_assert(!!model); 233 ck_assert(!!model);
234 234
@@ -307,16 +307,16 @@ _children_average_slice_get_then(Efl_Model *model, void *data EINA_UNUSED, const
307 return eina_future_as_value(f); 307 return eina_future_as_value(f);
308} 308}
309 309
310EFL_START_TEST(efl_ui_model_average_test) 310EFL_START_TEST(efl_ui_average_model_test)
311{ 311{
312 Efl_Model_Item *base_model, *model; 312 Efl_Generic_Model *base_model, *model;
313 Eina_Future *future; 313 Eina_Future *future;
314 Eina_Value *ret__; 314 Eina_Value *ret__;
315 int real__; 315 int real__;
316 316
317 base_model = _generate_base_model(); 317 base_model = _generate_base_model();
318 318
319 model = efl_add_ref(EFL_UI_MODEL_AVERAGE_CLASS, efl_main_loop_get(), 319 model = efl_add_ref(EFL_UI_AVERAGE_MODEL_CLASS, efl_main_loop_get(),
320 efl_ui_view_model_set(efl_added, base_model)); 320 efl_ui_view_model_set(efl_added, base_model));
321 ck_assert(!!model); 321 ck_assert(!!model);
322 322
@@ -345,7 +345,7 @@ efl_ui_model(TCase *tc)
345 expected_average[1] = ((base_ints[0] * 3 + base_ints[1] * 3) * 3) / 2; 345 expected_average[1] = ((base_ints[0] * 3 + base_ints[1] * 3) * 3) / 2;
346 expected_average[2] = base_ints[0] * 3 + base_ints[1] * 3 + base_ints[2] * 3; 346 expected_average[2] = base_ints[0] * 3 + base_ints[1] * 3 + base_ints[2] * 3;
347 347
348 tcase_add_test(tc, efl_ui_model_homogeneous_test); 348 tcase_add_test(tc, efl_ui_homogeneous_model_test);
349 tcase_add_test(tc, efl_ui_model_average_test); 349 tcase_add_test(tc, efl_ui_average_model_test);
350 tcase_add_test(tc, efl_ui_model_exact_test); 350 tcase_add_test(tc, efl_ui_exact_model_test);
351} 351}
diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c
index 45f603b958..e699cf448a 100644
--- a/src/tests/elementary/efl_ui_test_layout.c
+++ b/src/tests/elementary/efl_ui_test_layout.c
@@ -22,7 +22,7 @@ EFL_START_TEST(efl_ui_layout_test_model_connect)
22{ 22{
23 char buf[PATH_MAX]; 23 char buf[PATH_MAX];
24 Evas_Object *win, *ly; 24 Evas_Object *win, *ly;
25 Efl_Model_Item *model; 25 Efl_Generic_Model *model;
26 Eina_Value v; 26 Eina_Value v;
27 Eina_Future *f; 27 Eina_Future *f;
28 const char *part_text; 28 const char *part_text;
@@ -35,7 +35,7 @@ EFL_START_TEST(efl_ui_layout_test_model_connect)
35 efl_file_set(ly, buf, "layout"); 35 efl_file_set(ly, buf, "layout");
36 efl_gfx_entity_visible_set(ly, EINA_TRUE); 36 efl_gfx_entity_visible_set(ly, EINA_TRUE);
37 37
38 model = efl_add(EFL_MODEL_ITEM_CLASS, win); 38 model = efl_add(EFL_GENERIC_MODEL_CLASS, win);
39 ck_assert(!!eina_value_setup(&v, EINA_VALUE_TYPE_STRING)); 39 ck_assert(!!eina_value_setup(&v, EINA_VALUE_TYPE_STRING));
40 ck_assert(!!eina_value_set(&v, text_value)); 40 ck_assert(!!eina_value_set(&v, text_value));
41 f = efl_model_property_set(model, "text_property", &v); 41 f = efl_model_property_set(model, "text_property", &v);