summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-11 19:22:28 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-03-11 19:28:02 -0300
commit305749f049ceb73071febe2ac723dadff7b69dbc (patch)
tree8b00566c34032b6ccf0ccbe452c1ca07dcade2c8 /src/tests
parentd96c71c37ced7c9b630a25a9dc650a880903889a (diff)
csharp: Fix event names with underscore.
Summary: names like `focus_geometry,changed` shoud be converted to FocusGeometryChanged instead of Focus_geometryChanged. Fixes T7735 Test Plan: run tests Reviewers: vitor.sousa, felipealmeida, segfaultxavi Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7735 Differential Revision: https://phab.enlightenment.org/D8301
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/efl_mono/Events.cs21
-rw-r--r--src/tests/efl_mono/dummy_test_object.eo4
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c5
3 files changed, 30 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index 2cf881804b..2d6dedb8e9 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -253,4 +253,25 @@ class TestInterfaceEvents
253 Test.Assert(another_called); 253 Test.Assert(another_called);
254 } 254 }
255} 255}
256
257class TestEventNaming
258{
259 // For events named line focus_geometry,changed
260 public static void test_event_naming()
261 {
262 var obj = new Dummy.TestObject();
263 var test_called = false;
264
265 EventHandler cb = (object sender, EventArgs e) => {
266 test_called = true;
267 };
268
269 obj.EvtWithUnderEvt += cb;
270
271 obj.EmitEventWithUnder();
272
273 Test.Assert(test_called);
274
275 }
276}
256} 277}
diff --git a/src/tests/efl_mono/dummy_test_object.eo b/src/tests/efl_mono/dummy_test_object.eo
index d0311e96ac..0d6ced8e62 100644
--- a/src/tests/efl_mono/dummy_test_object.eo
+++ b/src/tests/efl_mono/dummy_test_object.eo
@@ -1310,6 +1310,9 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.An
1310 } 1310 }
1311 } 1311 }
1312 1312
1313 emit_event_with_under {
1314 }
1315
1313 append_to_strbuf { 1316 append_to_strbuf {
1314 params { 1317 params {
1315 @in buf: strbuf; 1318 @in buf: strbuf;
@@ -1406,5 +1409,6 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.An
1406 evt,with,struct @hot: Dummy.StructSimple; 1409 evt,with,struct @hot: Dummy.StructSimple;
1407 evt,with,struct,complex @hot: Dummy.StructComplex; 1410 evt,with,struct,complex @hot: Dummy.StructComplex;
1408 evt,with,list @hot: list<string>; 1411 evt,with,list @hot: list<string>;
1412 evt_with,under @hot: void;
1409 } 1413 }
1410} 1414}
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 8968e46801..11190c9124 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -3789,6 +3789,11 @@ void _dummy_test_object_emit_event_with_list(Eo *obj, EINA_UNUSED Dummy_Test_Obj
3789 efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_LIST, data); 3789 efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_LIST, data);
3790} 3790}
3791 3791
3792void _dummy_test_object_emit_event_with_under(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd)
3793{
3794 efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_UNDER, NULL);
3795}
3796
3792void _dummy_test_object_append_to_strbuf(EINA_UNUSED Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, Eina_Strbuf *buf, const char *str) 3797void _dummy_test_object_append_to_strbuf(EINA_UNUSED Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, Eina_Strbuf *buf, const char *str)
3793{ 3798{
3794 eina_strbuf_append(buf, str); 3799 eina_strbuf_append(buf, str);