aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/efl_mono/libefl_mono_native_test.c
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-11 20:01:38 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-26 10:55:18 -0300
commitff1fda829d1b5b9678b2cb9054d7476dbce4b27d (patch)
tree1113bd9b487e5a276265162c5577b69a5de4dd9c /src/tests/efl_mono/libefl_mono_native_test.c
parentefl_mono: Move event generators to its own header. (diff)
downloadefl-ff1fda829d1b5b9678b2cb9054d7476dbce4b27d.tar.gz
efl_mono: Actually test events by passing things by value and structs
Summary: While the test events were declared as by value, the support code passed by reference, which was - wrongly - the only implementation supported in event code. Also added test with Eina_Bool and structs (passed by pointer to events, while not having the ptr modifier explicitly. Depends on https://phab.enlightenment.org/D5995 Reviewers: felipealmeida Reviewed By: felipealmeida Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5996
Diffstat (limited to 'src/tests/efl_mono/libefl_mono_native_test.c')
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 2050e96266..4cf06debe8 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -3719,19 +3719,19 @@ void _test_testing_emit_event_with_string(Eo *obj, EINA_UNUSED Test_Testing_Data
free(ptr);
}
-void _test_testing_emit_event_with_int(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, int data)
+void _test_testing_emit_event_with_bool(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, Eina_Bool data)
{
- efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_INT, &data);
+ efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_BOOL, (void *) (uintptr_t) data);
}
-void _test_testing_emit_event_with_uint(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, unsigned int data)
+void _test_testing_emit_event_with_int(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, int data)
{
- efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_UINT, &data);
+ efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_INT, (void *) (uintptr_t) data);
}
-void _test_testing_emit_event_with_float(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, float data)
+void _test_testing_emit_event_with_uint(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, unsigned int data)
{
- efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_FLOAT, &data);
+ efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_UINT, (void *) (uintptr_t) data);
}
void _test_testing_emit_event_with_obj(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, Eo *data)
@@ -3739,6 +3739,17 @@ void _test_testing_emit_event_with_obj(Eo *obj, EINA_UNUSED Test_Testing_Data *p
efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_OBJ, data);
}
+void _test_testing_emit_event_with_error(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, Eina_Error data)
+{
+ efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_ERROR, &data);
+}
+
+void _test_testing_emit_event_with_struct(Eo *obj, EINA_UNUSED Test_Testing_Data *pd, Test_StructSimple data)
+{
+ efl_event_callback_legacy_call(obj, TEST_TESTING_EVENT_EVT_WITH_STRUCT, &data);
+}
+
+
Efl_Object *_test_testing_efl_part_part(EINA_UNUSED const Eo *obj, Test_Testing_Data *pd, const char *name)
{
if (!strcmp(name, "part1"))