summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/Eo.cs
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-05-03 01:02:11 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-05-03 18:04:41 -0300
commitfe7106d4600edb368a51a7c683d5fd35a4e211fe (patch)
tree29ae683965c0e62d1c9560298ade51e38d3f8837 /src/tests/efl_mono/Eo.cs
parent4636d6e0eb1f4a66b202b6cf6df793ec40c135a6 (diff)
efl_mono: Update tests and examples after rename
Summary: Separated from the generator and libs for easier review Depends on D6050 Reviewers: felipealmeida, vitor.sousa Reviewed By: vitor.sousa Subscribers: cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D6051
Diffstat (limited to 'src/tests/efl_mono/Eo.cs')
-rw-r--r--src/tests/efl_mono/Eo.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index d6992ade55..c78027b5c6 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -14,11 +14,11 @@ class TestEo
14 // 14 //
15 public static void return_same_object() 15 public static void return_same_object()
16 { 16 {
17 test.Testing testing = new test.TestingConcrete(); 17 test.ITesting testing = new test.Testing();
18 test.Testing o1 = testing.ReturnObject(); 18 test.ITesting o1 = testing.ReturnObject();
19 Test.Assert(o1.raw_handle != IntPtr.Zero); 19 Test.Assert(o1.raw_handle != IntPtr.Zero);
20 Test.Assert(o1.raw_handle == testing.raw_handle); 20 Test.Assert(o1.raw_handle == testing.raw_handle);
21 test.Testing o2 = o1.ReturnObject(); 21 test.ITesting o2 = o1.ReturnObject();
22 Test.Assert(o2.raw_handle != IntPtr.Zero); 22 Test.Assert(o2.raw_handle != IntPtr.Zero);
23 Test.Assert(o2.raw_handle == o1.raw_handle); 23 Test.Assert(o2.raw_handle == o1.raw_handle);
24 } 24 }
@@ -28,7 +28,7 @@ class TestEo
28 { 28 {
29 bool delEventCalled = false; 29 bool delEventCalled = false;
30 { 30 {
31 test.Testing obj = new test.TestingConcrete(); 31 test.ITesting obj = new test.Testing();
32 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; }; 32 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; };
33 } 33 }
34 34
@@ -45,7 +45,7 @@ class TestEo
45 { 45 {
46 bool delEventCalled = false; 46 bool delEventCalled = false;
47 { 47 {
48 test.Testing obj = new test.TestingConcrete(); 48 test.ITesting obj = new test.Testing();
49 obj.DelEvt += (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 }
@@ -58,7 +58,7 @@ class TestEo
58 { 58 {
59 bool delEventCalled = false; 59 bool delEventCalled = false;
60 { 60 {
61 test.Testing obj = new Derived(); 61 test.ITesting obj = new Derived();
62 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; }; 62 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; };
63 } 63 }
64 64
@@ -75,7 +75,7 @@ class TestEo
75 { 75 {
76 bool delEventCalled = false; 76 bool delEventCalled = false;
77 { 77 {
78 test.Testing obj = new Derived(); 78 test.ITesting obj = new Derived();
79 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; }; 79 obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; };
80 ((IDisposable)obj).Dispose(); 80 ((IDisposable)obj).Dispose();
81 } 81 }
@@ -94,7 +94,7 @@ class TestEoInherit
94{ 94{
95 public static void instantiate_inherited() 95 public static void instantiate_inherited()
96 { 96 {
97 efl.Loop loop = new MyLoop(); 97 efl.ILoop loop = new MyLoop();
98 Test.Assert(loop.raw_handle != System.IntPtr.Zero); 98 Test.Assert(loop.raw_handle != System.IntPtr.Zero);
99 } 99 }
100} 100}
@@ -103,7 +103,7 @@ class TestEoNames
103{ 103{
104 public static void name_getset() 104 public static void name_getset()
105 { 105 {
106 test.Testing obj = new test.TestingConcrete(); 106 test.ITesting obj = new test.Testing();
107 107
108 string name = "Dummy"; 108 string name = "Dummy";
109 obj.SetName(name); 109 obj.SetName(name);
@@ -117,7 +117,7 @@ class TestEoConstructingMethods
117 { 117 {
118 bool called = false; 118 bool called = false;
119 string name = "Test object"; 119 string name = "Test object";
120 test.Testing obj = new test.TestingConcrete(null, (test.Testing a) => { 120 test.ITesting obj = new test.Testing(null, (test.ITesting a) => {
121 called = true; 121 called = true;
122 Console.WriteLine("callback: obj raw_handle: {0:x}", a.raw_handle); 122 Console.WriteLine("callback: obj raw_handle: {0:x}", a.raw_handle);
123 a.SetName(name); 123 a.SetName(name);
@@ -129,7 +129,7 @@ class TestEoConstructingMethods
129 129
130 private class Derived : test.TestingInherit 130 private class Derived : test.TestingInherit
131 { 131 {
132 public Derived(test.Testing parent = null, 132 public Derived(test.ITesting parent = null,
133 test.TestingInherit.ConstructingMethod cb = null) : base(parent, cb) { 133 test.TestingInherit.ConstructingMethod cb = null) : base(parent, cb) {
134 } 134 }
135 } 135 }
@@ -138,7 +138,7 @@ class TestEoConstructingMethods
138 { 138 {
139 bool called = false; 139 bool called = false;
140 string name = "Another test object"; 140 string name = "Another test object";
141 Derived obj = new Derived(null, (test.Testing a) => { 141 Derived obj = new Derived(null, (test.ITesting a) => {
142 called = true; 142 called = true;
143 a.SetComment(name); 143 a.SetComment(name);
144 }); 144 });
@@ -152,41 +152,41 @@ class TestEoParent
152{ 152{
153 public static void basic_parent() 153 public static void basic_parent()
154 { 154 {
155 test.Testing parent = new test.TestingConcrete(null); 155 test.ITesting parent = new test.Testing(null);
156 test.Testing child = new test.TestingConcrete(parent); 156 test.ITesting child = new test.Testing(parent);
157 157
158 Test.AssertEquals(parent, child.GetParent()); 158 Test.AssertEquals(parent, child.GetParent());
159 159
160 test.Testing parent_retrieved = test.TestingConcrete.static_cast(child.GetParent()); 160 test.ITesting parent_retrieved = test.Testing.static_cast(child.GetParent());
161 Test.AssertEquals(parent, parent_retrieved); 161 Test.AssertEquals(parent, parent_retrieved);
162 } 162 }
163 163
164 public static void parent_inherited_class() 164 public static void parent_inherited_class()
165 { 165 {
166 test.Numberwrapper parent = new test.NumberwrapperConcrete(null); 166 test.INumberwrapper parent = new test.Numberwrapper(null);
167 test.Testing child = new test.TestingConcrete(parent); 167 test.ITesting child = new test.Testing(parent);
168 168
169 Test.AssertEquals(parent, child.GetParent()); 169 Test.AssertEquals(parent, child.GetParent());
170 170
171 test.Numberwrapper parent_retrieved = test.NumberwrapperConcrete.static_cast(child.GetParent()); 171 test.INumberwrapper parent_retrieved = test.Numberwrapper.static_cast(child.GetParent());
172 Test.AssertEquals(parent, parent_retrieved); 172 Test.AssertEquals(parent, parent_retrieved);
173 } 173 }
174 174
175 private class Derived : test.TestingInherit 175 private class Derived : test.TestingInherit
176 { 176 {
177 public Derived(test.Testing parent = null) : base (parent) 177 public Derived(test.ITesting parent = null) : base (parent)
178 { 178 {
179 } 179 }
180 } 180 }
181 181
182 public static void basic_parent_managed_inherit() 182 public static void basic_parent_managed_inherit()
183 { 183 {
184 test.Testing parent = new Derived(null); 184 test.ITesting parent = new Derived(null);
185 test.Testing child = new Derived(parent); 185 test.ITesting child = new Derived(parent);
186 186
187 Test.AssertEquals(parent, child.GetParent()); 187 Test.AssertEquals(parent, child.GetParent());
188 188
189 test.Testing parent_from_cast = test.TestingConcrete.static_cast(child.GetParent()); 189 test.ITesting parent_from_cast = test.Testing.static_cast(child.GetParent());
190 Test.AssertEquals(parent, parent_from_cast); 190 Test.AssertEquals(parent, parent_from_cast);
191 } 191 }
192} 192}
@@ -196,15 +196,15 @@ class TestKlassMethods
196 public static void basic_class_method() 196 public static void basic_class_method()
197 { 197 {
198 int reference = 0xbeef; 198 int reference = 0xbeef;
199 test.TestingConcrete.SetKlassProp(reference); 199 test.Testing.SetKlassProp(reference);
200 Test.AssertEquals(reference, test.TestingConcrete.GetKlassProp()); 200 Test.AssertEquals(reference, test.Testing.GetKlassProp());
201 } 201 }
202 202
203 public static void inherited_class_method() 203 public static void inherited_class_method()
204 { 204 {
205 int reference = 0xdead; 205 int reference = 0xdead;
206 test.ChildConcrete.SetKlassProp(reference); 206 test.Child.SetKlassProp(reference);
207 Test.AssertEquals(reference, test.ChildConcrete.GetKlassProp()); 207 Test.AssertEquals(reference, test.Child.GetKlassProp());
208 } 208 }
209} 209}
210 210