summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-05 19:42:02 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-06 17:09:42 +0200
commit9baa96c35271153d2b017fe072ee3e485b7f2c2b (patch)
tree92342c4ea72ccb0639004e7a08a7bb184813e109 /src/tests
parentc63b2d136ea8508a4cd2b31eebe02c0789441af1 (diff)
efl_ui_check: migrate from own property to Efl.Ui.Selectable
this is the basic work for getting radio group as a single_selection interface, which can be a part of mutli_selection. Which will come both later on. ref T8057 Differential Revision: https://phab.enlightenment.org/D9504
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/efl_ui_test_check.c22
-rw-r--r--src/tests/elementary/efl_ui_test_radio_group.c22
2 files changed, 22 insertions, 22 deletions
diff --git a/src/tests/elementary/efl_ui_test_check.c b/src/tests/elementary/efl_ui_test_check.c
index bd38aa1e8e..232bc7cae5 100644
--- a/src/tests/elementary/efl_ui_test_check.c
+++ b/src/tests/elementary/efl_ui_test_check.c
@@ -36,16 +36,16 @@ EFL_END_TEST
36 36
37EFL_START_TEST(check_selection_state) 37EFL_START_TEST(check_selection_state)
38{ 38{
39 efl_ui_check_selected_set(check, EINA_TRUE); 39 efl_ui_selectable_selected_set(check, EINA_TRUE);
40 ck_assert_int_eq(efl_ui_check_selected_get(check), EINA_TRUE); 40 ck_assert_int_eq(efl_ui_selectable_selected_get(check), EINA_TRUE);
41 efl_ui_check_selected_set(check, EINA_TRUE); 41 efl_ui_selectable_selected_set(check, EINA_TRUE);
42 ck_assert_int_eq(efl_ui_check_selected_get(check), EINA_TRUE); 42 ck_assert_int_eq(efl_ui_selectable_selected_get(check), EINA_TRUE);
43 //TODO verify that signals can be emitted 43 //TODO verify that signals can be emitted
44 44
45 efl_ui_check_selected_set(check, EINA_FALSE); 45 efl_ui_selectable_selected_set(check, EINA_FALSE);
46 ck_assert_int_eq(efl_ui_check_selected_get(check), EINA_FALSE); 46 ck_assert_int_eq(efl_ui_selectable_selected_get(check), EINA_FALSE);
47 efl_ui_check_selected_set(check, EINA_FALSE); 47 efl_ui_selectable_selected_set(check, EINA_FALSE);
48 ck_assert_int_eq(efl_ui_check_selected_get(check), EINA_FALSE); 48 ck_assert_int_eq(efl_ui_selectable_selected_get(check), EINA_FALSE);
49 //TODO verify that signals can be emitted 49 //TODO verify that signals can be emitted
50} 50}
51EFL_END_TEST 51EFL_END_TEST
@@ -62,10 +62,10 @@ EFL_START_TEST(check_selection_events)
62{ 62{
63 Eina_Bool bool_event_info = EINA_FALSE; 63 Eina_Bool bool_event_info = EINA_FALSE;
64 64
65 efl_event_callback_add(check, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _check, &bool_event_info); 65 efl_event_callback_add(check, EFL_UI_EVENT_SELECTED_CHANGED, _check, &bool_event_info);
66 efl_ui_check_selected_set(check, EINA_TRUE); 66 efl_ui_selectable_selected_set(check, EINA_TRUE);
67 ck_assert_int_eq(bool_event_info, EINA_TRUE); 67 ck_assert_int_eq(bool_event_info, EINA_TRUE);
68 efl_ui_check_selected_set(check, EINA_FALSE); 68 efl_ui_selectable_selected_set(check, EINA_FALSE);
69 ck_assert_int_eq(bool_event_info, EINA_FALSE); 69 ck_assert_int_eq(bool_event_info, EINA_FALSE);
70} 70}
71EFL_END_TEST 71EFL_END_TEST
diff --git a/src/tests/elementary/efl_ui_test_radio_group.c b/src/tests/elementary/efl_ui_test_radio_group.c
index c13d17b7c7..664819dd41 100644
--- a/src/tests/elementary/efl_ui_test_radio_group.c
+++ b/src/tests/elementary/efl_ui_test_radio_group.c
@@ -71,16 +71,16 @@ EFL_START_TEST(active_selected_value_setting)
71 efl_ui_radio_group_selected_value_set(radio_group, 1); 71 efl_ui_radio_group_selected_value_set(radio_group, 1);
72 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1); 72 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1);
73 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r1); 73 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r1);
74 ck_assert_int_eq(efl_ui_check_selected_get(r1), EINA_TRUE); 74 ck_assert_int_eq(efl_ui_selectable_selected_get(r1), EINA_TRUE);
75 ck_assert_int_eq(efl_ui_check_selected_get(r2), EINA_FALSE); 75 ck_assert_int_eq(efl_ui_selectable_selected_get(r2), EINA_FALSE);
76 EXPECT_EVT(1,1); 76 EXPECT_EVT(1,1);
77 77
78 RESET_EVT 78 RESET_EVT
79 efl_ui_radio_group_selected_object_set(radio_group, r2); 79 efl_ui_radio_group_selected_object_set(radio_group, r2);
80 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 2); 80 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 2);
81 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r2); 81 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r2);
82 ck_assert_int_eq(efl_ui_check_selected_get(r1), EINA_FALSE); 82 ck_assert_int_eq(efl_ui_selectable_selected_get(r1), EINA_FALSE);
83 ck_assert_int_eq(efl_ui_check_selected_get(r2), EINA_TRUE); 83 ck_assert_int_eq(efl_ui_selectable_selected_get(r2), EINA_TRUE);
84 EXPECT_EVT(1,2); 84 EXPECT_EVT(1,2);
85} 85}
86EFL_END_TEST 86EFL_END_TEST
@@ -102,16 +102,16 @@ EFL_START_TEST(active_selection_setting)
102 efl_ui_radio_group_selected_object_set(radio_group, r1); 102 efl_ui_radio_group_selected_object_set(radio_group, r1);
103 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1); 103 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1);
104 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r1); 104 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r1);
105 ck_assert_int_eq(efl_ui_check_selected_get(r1), EINA_TRUE); 105 ck_assert_int_eq(efl_ui_selectable_selected_get(r1), EINA_TRUE);
106 ck_assert_int_eq(efl_ui_check_selected_get(r2), EINA_FALSE); 106 ck_assert_int_eq(efl_ui_selectable_selected_get(r2), EINA_FALSE);
107 EXPECT_EVT(1,1); 107 EXPECT_EVT(1,1);
108 108
109 RESET_EVT 109 RESET_EVT
110 efl_ui_radio_group_selected_object_set(radio_group, r2); 110 efl_ui_radio_group_selected_object_set(radio_group, r2);
111 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 2); 111 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 2);
112 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r2); 112 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r2);
113 ck_assert_int_eq(efl_ui_check_selected_get(r1), EINA_FALSE); 113 ck_assert_int_eq(efl_ui_selectable_selected_get(r1), EINA_FALSE);
114 ck_assert_int_eq(efl_ui_check_selected_get(r2), EINA_TRUE); 114 ck_assert_int_eq(efl_ui_selectable_selected_get(r2), EINA_TRUE);
115 EXPECT_EVT(1,2); 115 EXPECT_EVT(1,2);
116} 116}
117EFL_END_TEST 117EFL_END_TEST
@@ -127,7 +127,7 @@ EFL_START_TEST(active_selection_object_setting)
127 RESET_EVT 127 RESET_EVT
128 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), -1); 128 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), -1);
129 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), NULL); 129 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), NULL);
130 efl_ui_check_selected_set(r, EINA_TRUE); 130 efl_ui_selectable_selected_set(r, EINA_TRUE);
131 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1); 131 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1);
132 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r); 132 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r);
133 EXPECT_EVT(1,1); 133 EXPECT_EVT(1,1);
@@ -183,12 +183,12 @@ EFL_START_TEST(external_setting)
183 efl_ui_radio_group_register(radio_group, r); 183 efl_ui_radio_group_register(radio_group, r);
184 efl_ui_radio_group_register(radio_group, radio()); 184 efl_ui_radio_group_register(radio_group, radio());
185 RESET_EVT 185 RESET_EVT
186 efl_ui_check_selected_set(r, EINA_TRUE); 186 efl_ui_selectable_selected_set(r, EINA_TRUE);
187 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1); 187 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), 1);
188 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r); 188 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), r);
189 EXPECT_EVT(1,1); 189 EXPECT_EVT(1,1);
190 RESET_EVT 190 RESET_EVT
191 efl_ui_check_selected_set(r, EINA_FALSE); 191 efl_ui_selectable_selected_set(r, EINA_FALSE);
192 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), -1); 192 ck_assert_int_eq(efl_ui_radio_group_selected_value_get(radio_group), -1);
193 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), NULL); 193 ck_assert_ptr_eq(efl_ui_radio_group_selected_object_get(radio_group), NULL);
194 EXPECT_EVT(1,-1); 194 EXPECT_EVT(1,-1);