summaryrefslogtreecommitdiff
path: root/src/tests/elementary
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/elementary
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/elementary/efl_ui_model.c34
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c4
2 files changed, 19 insertions, 19 deletions
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);