summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-09-06 15:45:18 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-06 15:55:17 +0200
commit353524e1b89deb48b64c6125a92c1627a05deb75 (patch)
tree8c472f871bb7e1ea104b5641b080c9c744c90ba3 /src/tests/efl_mono
parent5e1f2cd68cb1563c0a5b03fa4093e6972d46c2e3 (diff)
eolian-mono: Renaming suffix for event and event args
Summary: suffix _Args to Args, Evt to Event Reviewers: lauromoura, felipealmeida Reviewed By: lauromoura Subscribers: Jaehyun_Cho, woohyun, segfaultxavi, cedric, felipealmeida, #reviewers, lauromoura, #committers Tags: #refactoring, PHID-PROJ-uhnmnvlvunw6jgoqdnd4, #efl_language_bindings Maniphest Tasks: T8164, T8163 Differential Revision: https://phab.enlightenment.org/D9692
Diffstat (limited to 'src/tests/efl_mono')
-rw-r--r--src/tests/efl_mono/Errors.cs2
-rw-r--r--src/tests/efl_mono/Events.cs40
-rw-r--r--src/tests/efl_mono/Model.cs2
3 files changed, 22 insertions, 22 deletions
diff --git a/src/tests/efl_mono/Errors.cs b/src/tests/efl_mono/Errors.cs
index 802ac33..9229ad0 100644
--- a/src/tests/efl_mono/Errors.cs
+++ b/src/tests/efl_mono/Errors.cs
@@ -99,7 +99,7 @@ class TestEolianError
99 // the managed code 99 // the managed code
100 var obj = new Dummy.TestObject(); 100 var obj = new Dummy.TestObject();
101 Listener listener = new Listener(); 101 Listener listener = new Listener();
102 obj.EvtWithIntEvt += listener.callback; 102 obj.EvtWithIntEvent += listener.callback;
103 103
104 Test.AssertRaises<Efl.EflException>(() => { obj.EmitEventWithInt(2); }); 104 Test.AssertRaises<Efl.EflException>(() => { obj.EmitEventWithInt(2); });
105 } 105 }
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index b664e2b..d7da6f6 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -30,7 +30,7 @@ class TestEoEvents
30 loop.SetName("loop"); 30 loop.SetName("loop");
31 TestEoEvents listener = new TestEoEvents(); 31 TestEoEvents listener = new TestEoEvents();
32 listener.loop = loop; 32 listener.loop = loop;
33 loop.IdleEvt += listener.callback; 33 loop.IdleEvent += listener.callback;
34 34
35 Test.Assert(!listener.called); 35 Test.Assert(!listener.called);
36 Test.Assert(!listener.correct_sender); 36 Test.Assert(!listener.correct_sender);
@@ -46,7 +46,7 @@ class TestEoEvents
46 var obj = new Dummy.TestObject(); 46 var obj = new Dummy.TestObject();
47 string received_string = null; 47 string received_string = null;
48 48
49 obj.EvtWithStringEvt += (object sender, Dummy.TestObjectEvtWithStringEvt_Args e) => { 49 obj.EvtWithStringEvent += (object sender, Dummy.TestObjectEvtWithStringEventArgs e) => {
50 received_string = e.arg; 50 received_string = e.arg;
51 }; 51 };
52 52
@@ -60,7 +60,7 @@ class TestEoEvents
60 var obj = new Dummy.TestObject(); 60 var obj = new Dummy.TestObject();
61 int received_int= 0; 61 int received_int= 0;
62 62
63 obj.EvtWithIntEvt += (object sender, Dummy.TestObjectEvtWithIntEvt_Args e) => { 63 obj.EvtWithIntEvent += (object sender, Dummy.TestObjectEvtWithIntEventArgs e) => {
64 received_int = e.arg; 64 received_int = e.arg;
65 }; 65 };
66 66
@@ -74,7 +74,7 @@ class TestEoEvents
74 var obj = new Dummy.TestObject(); 74 var obj = new Dummy.TestObject();
75 bool received_bool = false; 75 bool received_bool = false;
76 76
77 obj.EvtWithBoolEvt += (object sender, Dummy.TestObjectEvtWithBoolEvt_Args e) => { 77 obj.EvtWithBoolEvent += (object sender, Dummy.TestObjectEvtWithBoolEventArgs e) => {
78 received_bool = e.arg; 78 received_bool = e.arg;
79 }; 79 };
80 80
@@ -91,7 +91,7 @@ class TestEoEvents
91 { 91 {
92 var obj = new Dummy.TestObject(); 92 var obj = new Dummy.TestObject();
93 uint received_uint = 0; 93 uint received_uint = 0;
94 obj.EvtWithUintEvt += (object sender, Dummy.TestObjectEvtWithUintEvt_Args e) => { 94 obj.EvtWithUintEvent += (object sender, Dummy.TestObjectEvtWithUintEventArgs e) => {
95 received_uint = e.arg; 95 received_uint = e.arg;
96 }; 96 };
97 97
@@ -104,7 +104,7 @@ class TestEoEvents
104 { 104 {
105 var obj = new Dummy.TestObject(); 105 var obj = new Dummy.TestObject();
106 float received_float = 0; 106 float received_float = 0;
107 obj.EvtWithFloatEvt += (object sender, Dummy.TestObjectEvtWithFloatEvt_Args e) => { 107 obj.EvtWithFloatEvent += (object sender, Dummy.TestObjectEvtWithFloatEventArgs e) => {
108 received_float = e.arg; 108 received_float = e.arg;
109 }; 109 };
110 110
@@ -118,7 +118,7 @@ class TestEoEvents
118 var obj = new Dummy.TestObject(); 118 var obj = new Dummy.TestObject();
119 double received_double = 0; 119 double received_double = 0;
120 double reference = float.MaxValue + 42; 120 double reference = float.MaxValue + 42;
121 obj.EvtWithDoubleEvt += (object sender, Dummy.TestObjectEvtWithDoubleEvt_Args e) => { 121 obj.EvtWithDoubleEvent += (object sender, Dummy.TestObjectEvtWithDoubleEventArgs e) => {
122 received_double = e.arg; 122 received_double = e.arg;
123 }; 123 };
124 124
@@ -132,7 +132,7 @@ class TestEoEvents
132 var obj = new Dummy.TestObject(); 132 var obj = new Dummy.TestObject();
133 Dummy.TestObject received_obj = null; 133 Dummy.TestObject received_obj = null;
134 134
135 obj.EvtWithObjEvt += (object sender, Dummy.TestObjectEvtWithObjEvt_Args e) => { 135 obj.EvtWithObjEvent += (object sender, Dummy.TestObjectEvtWithObjEventArgs e) => {
136 received_obj = e.arg; 136 received_obj = e.arg;
137 }; 137 };
138 138
@@ -148,7 +148,7 @@ class TestEoEvents
148 var obj = new Dummy.TestObject(); 148 var obj = new Dummy.TestObject();
149 Eina.Error received_error = 0; 149 Eina.Error received_error = 0;
150 150
151 obj.EvtWithErrorEvt += (object sender, Dummy.TestObjectEvtWithErrorEvt_Args e) => { 151 obj.EvtWithErrorEvent += (object sender, Dummy.TestObjectEvtWithErrorEventArgs e) => {
152 received_error = e.arg; 152 received_error = e.arg;
153 }; 153 };
154 154
@@ -164,7 +164,7 @@ class TestEoEvents
164 var obj = new Dummy.TestObject(); 164 var obj = new Dummy.TestObject();
165 Dummy.StructSimple received_struct = default(Dummy.StructSimple); 165 Dummy.StructSimple received_struct = default(Dummy.StructSimple);
166 166
167 obj.EvtWithStructEvt += (object sender, Dummy.TestObjectEvtWithStructEvt_Args e) => { 167 obj.EvtWithStructEvent += (object sender, Dummy.TestObjectEvtWithStructEventArgs e) => {
168 received_struct = e.arg; 168 received_struct = e.arg;
169 }; 169 };
170 170
@@ -181,7 +181,7 @@ class TestEoEvents
181 var obj = new Dummy.TestObject(); 181 var obj = new Dummy.TestObject();
182 Dummy.StructComplex received_struct = default(Dummy.StructComplex); 182 Dummy.StructComplex received_struct = default(Dummy.StructComplex);
183 183
184 obj.EvtWithStructComplexEvt += (object sender, Dummy.TestObjectEvtWithStructComplexEvt_Args e) => { 184 obj.EvtWithStructComplexEvent += (object sender, Dummy.TestObjectEvtWithStructComplexEventArgs e) => {
185 received_struct = e.arg; 185 received_struct = e.arg;
186 }; 186 };
187 187
@@ -202,7 +202,7 @@ class TestEoEvents
202 sent.Append("Def"); 202 sent.Append("Def");
203 sent.Append("Ghi"); 203 sent.Append("Ghi");
204 204
205 obj.EvtWithArrayEvt += (object sender, Dummy.TestObjectEvtWithArrayEvt_Args e) => { 205 obj.EvtWithArrayEvent += (object sender, Dummy.TestObjectEvtWithArrayEventArgs e) => {
206 received = e.arg; 206 received = e.arg;
207 }; 207 };
208 208
@@ -222,16 +222,16 @@ class TestEventAddRemove
222 var obj = new Dummy.TestObject(); 222 var obj = new Dummy.TestObject();
223 bool called = true; 223 bool called = true;
224 224
225 EventHandler<Dummy.TestObjectEvtWithIntEvt_Args> evtCb = (object sender, Dummy.TestObjectEvtWithIntEvt_Args e) => { 225 EventHandler<Dummy.TestObjectEvtWithIntEventArgs> evtCb = (object sender, Dummy.TestObjectEvtWithIntEventArgs e) => {
226 called = true; 226 called = true;
227 }; 227 };
228 228
229 obj.EvtWithIntEvt += evtCb; 229 obj.EvtWithIntEvent += evtCb;
230 obj.EmitEventWithInt(42); 230 obj.EmitEventWithInt(42);
231 Test.Assert(called); 231 Test.Assert(called);
232 232
233 called = false; 233 called = false;
234 obj.EvtWithIntEvt -= evtCb; 234 obj.EvtWithIntEvent -= evtCb;
235 obj.EmitEventWithInt(42); 235 obj.EmitEventWithInt(42);
236 Test.Assert(!called); 236 Test.Assert(!called);
237 } 237 }
@@ -248,7 +248,7 @@ class TestInterfaceEvents
248 called = true; 248 called = true;
249 }; 249 };
250 250
251 obj.NonconflictedEvt += cb; 251 obj.NonconflictedEvent += cb;
252 obj.EmitNonconflicted(); 252 obj.EmitNonconflicted();
253 Test.Assert(called); 253 Test.Assert(called);
254 } 254 }
@@ -266,7 +266,7 @@ class TestEventNaming
266 test_called = true; 266 test_called = true;
267 }; 267 };
268 268
269 obj.EvtWithUnderEvt += cb; 269 obj.EvtWithUnderEvent += cb;
270 270
271 obj.EmitEventWithUnder(); 271 obj.EmitEventWithUnder();
272 272
@@ -279,12 +279,12 @@ class TestEventWithDeadWrappers
279{ 279{
280 280
281 private static WeakReference AttachToManager(Dummy.EventManager manager, 281 private static WeakReference AttachToManager(Dummy.EventManager manager,
282 EventHandler<Dummy.TestObjectEvtWithIntEvt_Args> cb) 282 EventHandler<Dummy.TestObjectEvtWithIntEventArgs> cb)
283 { 283 {
284 var obj = new Dummy.TestObject(); 284 var obj = new Dummy.TestObject();
285 manager.Emitter = obj; 285 manager.Emitter = obj;
286 286
287 obj.EvtWithIntEvt += cb; 287 obj.EvtWithIntEvent += cb;
288 return new WeakReference(obj); 288 return new WeakReference(obj);
289 } 289 }
290 290
@@ -298,7 +298,7 @@ class TestEventWithDeadWrappers
298 int received = -1; 298 int received = -1;
299 299
300 // attach to evt with int 300 // attach to evt with int
301 EventHandler<Dummy.TestObjectEvtWithIntEvt_Args> cb = (object sender, Dummy.TestObjectEvtWithIntEvt_Args args) => { 301 EventHandler<Dummy.TestObjectEvtWithIntEventArgs> cb = (object sender, Dummy.TestObjectEvtWithIntEventArgs args) => {
302 callbackCalled = true; 302 callbackCalled = true;
303 received = args.arg; 303 received = args.arg;
304 Test.Assert(Object.ReferenceEquals(sender, wref.Target)); 304 Test.Assert(Object.ReferenceEquals(sender, wref.Target));
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index a43d9da..829accf 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -66,7 +66,7 @@ public class TestModel {
66 string propertyBound = null; 66 string propertyBound = null;
67 bool callbackCalled = false; 67 bool callbackCalled = false;
68 var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>(); 68 var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>();
69 factory.PropertyBoundEvt += (object sender, Efl.Ui.IPropertyBindPropertyBoundEvt_Args args) => { 69 factory.PropertyBoundEvent += (object sender, Efl.Ui.IPropertyBindPropertyBoundEventArgs args) => {
70 propertyBound = args.arg; 70 propertyBound = args.arg;
71 callbackCalled = true; 71 callbackCalled = true;
72 }; 72 };