summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-16 12:36:51 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-26 10:55:18 -0300
commit628e5ab95029c222e5f2eca3fa9a3702015fb8c1 (patch)
treef819d6e41a6c0981751003a81058affbb4ad986e /src/tests
parente59e8f0a15a6e1a699c1395e12b9431ea430c2b8 (diff)
efl_mono: Use PascalCase in events
Summary: To deal with events with the same name as some methods (Del, Invalidate, etc), the suffix Evt was added. Thus, now we use obj.ButtonClickedEvt += callback; Instead of obj.BUTTON_CLICKED += cal The argument classes use the same scheme, being called <Evt name>_Args. Depends on D5991 Reviewers: felipealmeida Reviewed By: felipealmeida Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5992
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/efl_mono/Eo.cs2
-rw-r--r--src/tests/efl_mono/Errors.cs4
-rw-r--r--src/tests/efl_mono/Events.cs14
3 files changed, 10 insertions, 10 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index a0c7a9ea40..c9cf1e980c 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -46,7 +46,7 @@ class TestEo
46 bool delEventCalled = false; 46 bool delEventCalled = false;
47 { 47 {
48 test.Testing obj = new test.TestingConcrete(); 48 test.Testing obj = new test.TestingConcrete();
49 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; }; 49 obj.DelEvt += (object sender, EventArgs e) => { delEventCalled = true; };
50 ((IDisposable)obj).Dispose(); 50 ((IDisposable)obj).Dispose();
51 } 51 }
52 52
diff --git a/src/tests/efl_mono/Errors.cs b/src/tests/efl_mono/Errors.cs
index a903cf1605..d403533720 100644
--- a/src/tests/efl_mono/Errors.cs
+++ b/src/tests/efl_mono/Errors.cs
@@ -110,9 +110,9 @@ class TestEolianError
110 // the managed code 110 // the managed code
111 efl.Loop loop = new efl.LoopConcrete(); 111 efl.Loop loop = new efl.LoopConcrete();
112 Listener listener = new Listener(); 112 Listener listener = new Listener();
113 loop.CALLBACK_ADD += listener.callback; 113 loop.CallbackAddEvt += listener.callback;
114 114
115 Test.AssertRaises<efl.EflException>(() => loop.IDLE += listener.another_callback); 115 Test.AssertRaises<efl.EflException>(() => loop.IdleEvt += listener.another_callback);
116 } 116 }
117} 117}
118} 118}
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index c0e9146bfa..9e5ddc14a4 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -23,12 +23,12 @@ class TestEoEvents
23 efl.Loop loop = new efl.LoopConcrete(); 23 efl.Loop loop = new efl.LoopConcrete();
24 loop.SetName("loop"); 24 loop.SetName("loop");
25 TestEoEvents listener = new TestEoEvents(); 25 TestEoEvents listener = new TestEoEvents();
26 loop.CALLBACK_ADD += listener.callback; 26 loop.CallbackAddEvt += listener.callback;
27 27
28 Test.Assert(!listener.called); 28 Test.Assert(!listener.called);
29 Test.Assert(!listener.correct_sender); 29 Test.Assert(!listener.correct_sender);
30 Test.AssertEquals("loop", loop.GetName()); 30 Test.AssertEquals("loop", loop.GetName());
31 loop.IDLE += listener.another_callback; 31 loop.IdleEvt += listener.another_callback;
32 Test.Assert(listener.called); 32 Test.Assert(listener.called);
33 Test.Assert(listener.correct_sender); 33 Test.Assert(listener.correct_sender);
34 Test.AssertEquals("loop_called", loop.GetName()); 34 Test.AssertEquals("loop_called", loop.GetName());
@@ -39,7 +39,7 @@ class TestEoEvents
39 test.Testing obj = new test.TestingConcrete(); 39 test.Testing obj = new test.TestingConcrete();
40 string received_string = null; 40 string received_string = null;
41 41
42 obj.EVT_WITH_STRING += (object sender, test.EVT_WITH_STRING_Args e) => { 42 obj.EvtWithStringEvt += (object sender, test.EvtWithStringEvt_Args e) => {
43 received_string = e.arg; 43 received_string = e.arg;
44 }; 44 };
45 45
@@ -53,7 +53,7 @@ class TestEoEvents
53 test.Testing obj = new test.TestingConcrete(); 53 test.Testing obj = new test.TestingConcrete();
54 int received_int= 0; 54 int received_int= 0;
55 55
56 obj.EVT_WITH_INT += (object sender, test.EVT_WITH_INT_Args e) => { 56 obj.EvtWithIntEvt += (object sender, test.EvtWithIntEvt_Args e) => {
57 received_int = e.arg; 57 received_int = e.arg;
58 }; 58 };
59 59
@@ -66,7 +66,7 @@ class TestEoEvents
66 { 66 {
67 test.Testing obj = new test.TestingConcrete(); 67 test.Testing obj = new test.TestingConcrete();
68 uint received_uint = 0; 68 uint received_uint = 0;
69 obj.EVT_WITH_UINT += (object sender, test.EVT_WITH_UINT_Args e) => { 69 obj.EvtWithUintEvt += (object sender, test.EvtWithUintEvt_Args e) => {
70 received_uint = e.arg; 70 received_uint = e.arg;
71 }; 71 };
72 72
@@ -80,7 +80,7 @@ class TestEoEvents
80 test.Testing obj = new test.TestingConcrete(); 80 test.Testing obj = new test.TestingConcrete();
81 float received_float= 0; 81 float received_float= 0;
82 82
83 obj.EVT_WITH_FLOAT += (object sender, test.EVT_WITH_FLOAT_Args e) => { 83 obj.EvtWithFloatEvt += (object sender, test.EvtWithFloatEvt_Args e) => {
84 received_float = e.arg; 84 received_float = e.arg;
85 }; 85 };
86 86
@@ -94,7 +94,7 @@ class TestEoEvents
94 test.Testing obj = new test.TestingConcrete(); 94 test.Testing obj = new test.TestingConcrete();
95 test.Testing received_obj = null; 95 test.Testing received_obj = null;
96 96
97 obj.EVT_WITH_OBJ += (object sender, test.EVT_WITH_OBJ_Args e) => { 97 obj.EvtWithObjEvt += (object sender, test.EvtWithObjEvt_Args e) => {
98 received_obj = e.arg; 98 received_obj = e.arg;
99 }; 99 };
100 100