summaryrefslogtreecommitdiff
path: root/src/tests/elementary/spec/efl_test_format.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-18 17:18:35 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-18 21:45:45 +0100
commit837528201f7761123974bcefef56b02967d758e6 (patch)
treeef0b3602c6ac6c7fb1e1524d25c9c00fcab1d72d /src/tests/elementary/spec/efl_test_format.c
parent9ccc66b90004a29c0790d58106857dc5e3377976 (diff)
efl_ui_format: make this usable with the standard behaviour of accessors
a accessor is never delivering a value, only the pointer to a value. This makes format working with accessors for list array carray. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10909
Diffstat (limited to 'src/tests/elementary/spec/efl_test_format.c')
-rw-r--r--src/tests/elementary/spec/efl_test_format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/elementary/spec/efl_test_format.c b/src/tests/elementary/spec/efl_test_format.c
index c3fa7d42f5..7540829edc 100644
--- a/src/tests/elementary/spec/efl_test_format.c
+++ b/src/tests/elementary/spec/efl_test_format.c
@@ -24,7 +24,7 @@ EFL_START_TEST(format_values)
24 Eina_Strbuf *buf = eina_strbuf_new(); 24 Eina_Strbuf *buf = eina_strbuf_new();
25 Eina_Value eina_val; 25 Eina_Value eina_val;
26 26
27 efl_ui_format_values_set(widget, EINA_C_ARRAY_ACCESSOR_NEW(values)); 27 efl_ui_format_values_set(widget, EINA_C_ARRAY_ACCESSOR_PTR_NEW(values));
28 eina_val = eina_value_int_init(17); 28 eina_val = eina_value_int_init(17);
29 efl_ui_format_formatted_value_get(widget, buf, eina_val); 29 efl_ui_format_formatted_value_get(widget, buf, eina_val);
30 ck_assert_str_eq(eina_strbuf_string_get(buf), "seventeen"); // Check that value works 30 ck_assert_str_eq(eina_strbuf_string_get(buf), "seventeen"); // Check that value works
@@ -141,7 +141,7 @@ EFL_START_TEST(format_mixed)
141 141
142 // Now we check combinations of different options 142 // Now we check combinations of different options
143 // Each one should be used in turn when the previous one fails: values, func, string, fallback 143 // Each one should be used in turn when the previous one fails: values, func, string, fallback
144 efl_ui_format_values_set(widget, EINA_C_ARRAY_ACCESSOR_NEW(values)); 144 efl_ui_format_values_set(widget, EINA_C_ARRAY_ACCESSOR_PTR_NEW(values));
145 efl_ui_format_func_set(widget, NULL, _partial_format_func, NULL); 145 efl_ui_format_func_set(widget, NULL, _partial_format_func, NULL);
146 efl_ui_format_string_set(widget, "%d rabbits", EFL_UI_FORMAT_STRING_TYPE_SIMPLE); 146 efl_ui_format_string_set(widget, "%d rabbits", EFL_UI_FORMAT_STRING_TYPE_SIMPLE);
147 147