summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-15 12:20:48 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-15 18:23:10 -0300
commitcd8b3d580f36f44b8218dc2789a42d4ce778b161 (patch)
tree2ec768087fc0ef90ea26704aae4dd20a44543d8d
parent18dba1e7c572a556bc2b53c88df389b2c81c578f (diff)
csharp: WIP - Test OnEvet methods.devs/lauromoura/interface_events
-rw-r--r--src/tests/efl_mono/Events.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index 4a6032c691..305841b9b5 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -254,6 +254,41 @@ class TestInterfaceEvents
254 } 254 }
255} 255}
256 256
257class TestEventTriggerFromCSharpChild
258{
259 private class Child : Dummy.TestObject
260 {
261 public Child() : base(null) { }
262
263 public void TriggerEvent(int value)
264 {
265 var args = new Dummy.TestObjectEvtWithIntEvt_Args();
266 args.arg = value;
267 OnEvtWithIntEvt(args);
268 }
269 }
270
271 public static void managed_event_callback()
272 {
273 var obj = new Child();
274 int received = -1;
275 int sent = 42;
276 obj.EvtWithIntEvt += (object sender, Dummy.TestObjectEvtWithIntEvt_Args e) => {
277 received = e.arg;
278 };
279
280 obj.TriggerEvent(sent);
281
282 Test.AssertEquals(received, sent);
283 }
284
285 public static void native_event_callback()
286 {
287 var obj = new Child();
288 //FIXME hook to native callback.
289 }
290}
291
257class TestEventNaming 292class TestEventNaming
258{ 293{
259 // For events named line focus_geometry,changed 294 // For events named line focus_geometry,changed