summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono
diff options
context:
space:
mode:
authorBruno da Silva Belo <bruno.belo@expertisesolutions.com.br>2019-11-14 14:26:16 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-11-14 15:32:42 -0300
commitcd113d7aae746f4bc9c1678e0942aeca64382781 (patch)
tree2a871591d00155ea07a02b56a9b26a6a3acb2477 /src/tests/efl_mono
parent37b55172b0d46d71f772af8fba17e1fb1b7c6c2c (diff)
csharp: Disposing IDisposable objects.
Summary: ref T8423 Reviewers: lauromoura, felipealmeida, YOhoho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8423 Differential Revision: https://phab.enlightenment.org/D10644
Diffstat (limited to 'src/tests/efl_mono')
-rw-r--r--src/tests/efl_mono/BasicDirection.cs1
-rw-r--r--src/tests/efl_mono/Eina.cs279
-rw-r--r--src/tests/efl_mono/Eo.cs40
-rw-r--r--src/tests/efl_mono/EoPromises.cs6
-rw-r--r--src/tests/efl_mono/Errors.cs9
-rw-r--r--src/tests/efl_mono/Events.cs22
-rw-r--r--src/tests/efl_mono/FunctionPointerMarshalling.cs3
-rw-r--r--src/tests/efl_mono/FunctionPointers.cs7
-rw-r--r--src/tests/efl_mono/Hash.cs3
-rw-r--r--src/tests/efl_mono/Inheritance.cs8
-rw-r--r--src/tests/efl_mono/Model.cs7
-rw-r--r--src/tests/efl_mono/Parts.cs8
-rw-r--r--src/tests/efl_mono/Promises.cs19
-rw-r--r--src/tests/efl_mono/Strbuf.cs6
-rw-r--r--src/tests/efl_mono/Strings.cs24
-rw-r--r--src/tests/efl_mono/Structs.cs9
-rw-r--r--src/tests/efl_mono/Value.cs25
-rw-r--r--src/tests/efl_mono/ValueEolian.cs19
18 files changed, 478 insertions, 17 deletions
diff --git a/src/tests/efl_mono/BasicDirection.cs b/src/tests/efl_mono/BasicDirection.cs
index ceeb22d..5c20ccb 100644
--- a/src/tests/efl_mono/BasicDirection.cs
+++ b/src/tests/efl_mono/BasicDirection.cs
@@ -31,6 +31,7 @@ class TestIntDirections
31 t.IntOut(original, out received); 31 t.IntOut(original, out received);
32 32
33 Test.AssertEquals(-original, received); 33 Test.AssertEquals(-original, received);
34 t.Dispose();
34 } 35 }
35 36
36 /* 37 /*
diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs
index 1dd57dc..b329bc3 100644
--- a/src/tests/efl_mono/Eina.cs
+++ b/src/tests/efl_mono/Eina.cs
@@ -38,6 +38,7 @@ class TestEinaBinbuf
38 var binbuf = new Eina.Binbuf(); 38 var binbuf = new Eina.Binbuf();
39 Test.Assert(binbuf.Handle != IntPtr.Zero); 39 Test.Assert(binbuf.Handle != IntPtr.Zero);
40 Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>())); 40 Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>()));
41 binbuf.Dispose();
41 } 42 }
42 43
43 public static void eina_binbuf_bytes() 44 public static void eina_binbuf_bytes()
@@ -47,6 +48,7 @@ class TestEinaBinbuf
47 byte[] cmp = binbuf.GetBytes(); 48 byte[] cmp = binbuf.GetBytes();
48 Test.Assert(cmp != test_string); 49 Test.Assert(cmp != test_string);
49 Test.Assert(cmp.SequenceEqual(test_string)); 50 Test.Assert(cmp.SequenceEqual(test_string));
51 binbuf.Dispose();
50 } 52 }
51 53
52 public static void eina_binbuf_bytes_length() 54 public static void eina_binbuf_bytes_length()
@@ -58,6 +60,7 @@ class TestEinaBinbuf
58 Test.Assert(cmp != test_string); 60 Test.Assert(cmp != test_string);
59 Test.Assert(cmp != expected); 61 Test.Assert(cmp != expected);
60 Test.Assert(cmp.SequenceEqual(expected)); 62 Test.Assert(cmp.SequenceEqual(expected));
63 binbuf.Dispose();
61 } 64 }
62 65
63 public static void eina_binbuf_copy_ctor() 66 public static void eina_binbuf_copy_ctor()
@@ -70,6 +73,8 @@ class TestEinaBinbuf
70 byte[] cmp2 = binbuf2.GetBytes(); 73 byte[] cmp2 = binbuf2.GetBytes();
71 Test.Assert(cmp != cmp2); 74 Test.Assert(cmp != cmp2);
72 Test.Assert(cmp.SequenceEqual(cmp2)); 75 Test.Assert(cmp.SequenceEqual(cmp2));
76 binbuf2.Dispose();
77 binbuf.Dispose();
73 } 78 }
74 79
75 public static void free_get_null_handle() 80 public static void free_get_null_handle()
@@ -78,6 +83,7 @@ class TestEinaBinbuf
78 Test.Assert(binbuf.Handle != IntPtr.Zero); 83 Test.Assert(binbuf.Handle != IntPtr.Zero);
79 binbuf.Free(); 84 binbuf.Free();
80 Test.Assert(binbuf.Handle == IntPtr.Zero); 85 Test.Assert(binbuf.Handle == IntPtr.Zero);
86 binbuf.Dispose();
81 } 87 }
82 88
83 public static void reset_get_empty_string() 89 public static void reset_get_empty_string()
@@ -90,6 +96,7 @@ class TestEinaBinbuf
90 binbuf.Reset(); 96 binbuf.Reset();
91 Test.Assert(binbuf.Handle != IntPtr.Zero); 97 Test.Assert(binbuf.Handle != IntPtr.Zero);
92 Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>())); 98 Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>()));
99 binbuf.Dispose();
93 } 100 }
94 101
95 public static void append_bytes() 102 public static void append_bytes()
@@ -99,6 +106,7 @@ class TestEinaBinbuf
99 byte[] cmp = binbuf.GetBytes(); 106 byte[] cmp = binbuf.GetBytes();
100 Test.Assert(cmp != test_string); 107 Test.Assert(cmp != test_string);
101 Test.Assert(cmp.SequenceEqual(test_string)); 108 Test.Assert(cmp.SequenceEqual(test_string));
109 binbuf.Dispose();
102 } 110 }
103 111
104 public static void append_bytes_length() 112 public static void append_bytes_length()
@@ -109,6 +117,7 @@ class TestEinaBinbuf
109 byte[] expected = System.Text.Encoding.UTF8.GetBytes("0123456"); 117 byte[] expected = System.Text.Encoding.UTF8.GetBytes("0123456");
110 Test.Assert(cmp != expected); 118 Test.Assert(cmp != expected);
111 Test.Assert(cmp.SequenceEqual(expected)); 119 Test.Assert(cmp.SequenceEqual(expected));
120 binbuf.Dispose();
112 } 121 }
113 122
114 public static void append_binbuf() 123 public static void append_binbuf()
@@ -122,6 +131,8 @@ class TestEinaBinbuf
122 Test.Assert(cmp != cmp2); 131 Test.Assert(cmp != cmp2);
123 Test.Assert(cmp2.SequenceEqual(cmp)); 132 Test.Assert(cmp2.SequenceEqual(cmp));
124 Test.Assert(cmp2.SequenceEqual(test_string)); 133 Test.Assert(cmp2.SequenceEqual(test_string));
134 binbuf2.Dispose();
135 binbuf.Dispose();
125 } 136 }
126 137
127 public static void append_char() 138 public static void append_char()
@@ -133,6 +144,7 @@ class TestEinaBinbuf
133 byte[] cmp = binbuf.GetBytes(); 144 byte[] cmp = binbuf.GetBytes();
134 Test.Assert(cmp.Length == 3); 145 Test.Assert(cmp.Length == 3);
135 Test.Assert(cmp[0] == 0 && cmp[1] == 12 && cmp[2] == 42); 146 Test.Assert(cmp[0] == 0 && cmp[1] == 12 && cmp[2] == 42);
147 binbuf.Dispose();
136 } 148 }
137 149
138 public static void remove() 150 public static void remove()
@@ -143,6 +155,7 @@ class TestEinaBinbuf
143 Test.Assert(binbuf.Handle != IntPtr.Zero); 155 Test.Assert(binbuf.Handle != IntPtr.Zero);
144 byte[] expected = System.Text.Encoding.UTF8.GetBytes("019ABCDEF"); 156 byte[] expected = System.Text.Encoding.UTF8.GetBytes("019ABCDEF");
145 Test.Assert(binbuf.GetBytes().SequenceEqual(expected)); 157 Test.Assert(binbuf.GetBytes().SequenceEqual(expected));
158 binbuf.Dispose();
146 } 159 }
147 160
148 public static void get_string_native() 161 public static void get_string_native()
@@ -150,6 +163,7 @@ class TestEinaBinbuf
150 var binbuf = new Eina.Binbuf(test_string); 163 var binbuf = new Eina.Binbuf(test_string);
151 Test.Assert(binbuf.GetBytes().SequenceEqual(test_string)); 164 Test.Assert(binbuf.GetBytes().SequenceEqual(test_string));
152 Test.Assert(binbuf.GetStringNative() != IntPtr.Zero); 165 Test.Assert(binbuf.GetStringNative() != IntPtr.Zero);
166 binbuf.Dispose();
153 } 167 }
154 168
155 public static void binbuf_free_string() 169 public static void binbuf_free_string()
@@ -159,6 +173,7 @@ class TestEinaBinbuf
159 binbuf.FreeString(); 173 binbuf.FreeString();
160 Test.Assert(binbuf.Handle != IntPtr.Zero); 174 Test.Assert(binbuf.Handle != IntPtr.Zero);
161 Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>())); 175 Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>()));
176 binbuf.Dispose();
162 } 177 }
163 178
164 public static void binbuf_length() 179 public static void binbuf_length()
@@ -166,6 +181,7 @@ class TestEinaBinbuf
166 var binbuf = new Eina.Binbuf(test_string, 6); 181 var binbuf = new Eina.Binbuf(test_string, 6);
167 Test.Assert(binbuf.Length == 6); 182 Test.Assert(binbuf.Length == 6);
168 Test.Assert(binbuf.GetBytes().Length == 6); 183 Test.Assert(binbuf.GetBytes().Length == 6);
184 binbuf.Dispose();
169 } 185 }
170 186
171 public static void test_eina_binbuf_in() 187 public static void test_eina_binbuf_in()
@@ -178,6 +194,7 @@ class TestEinaBinbuf
178 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33})); 194 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
179 binbuf.Dispose(); 195 binbuf.Dispose();
180 Test.Assert(binbuf.Handle == IntPtr.Zero); 196 Test.Assert(binbuf.Handle == IntPtr.Zero);
197 t.Dispose();
181 } 198 }
182 199
183 public static void test_eina_binbuf_in_own() 200 public static void test_eina_binbuf_in_own()
@@ -191,6 +208,7 @@ class TestEinaBinbuf
191 binbuf.Dispose(); 208 binbuf.Dispose();
192 Test.Assert(binbuf.Handle == IntPtr.Zero); 209 Test.Assert(binbuf.Handle == IntPtr.Zero);
193 Test.Assert(t.CheckBinbufInOwn()); 210 Test.Assert(t.CheckBinbufInOwn());
211 t.Dispose();
194 } 212 }
195 213
196 public static void test_eina_binbuf_out() 214 public static void test_eina_binbuf_out()
@@ -205,6 +223,7 @@ class TestEinaBinbuf
205 binbuf.Dispose(); 223 binbuf.Dispose();
206 Test.Assert(binbuf.Handle == IntPtr.Zero); 224 Test.Assert(binbuf.Handle == IntPtr.Zero);
207 Test.Assert(t.CheckBinbufOut()); 225 Test.Assert(t.CheckBinbufOut());
226 t.Dispose();
208 } 227 }
209 228
210 public static void test_eina_binbuf_out_own() 229 public static void test_eina_binbuf_out_own()
@@ -218,6 +237,7 @@ class TestEinaBinbuf
218 Test.Assert(binbuf.Append(base_seq)); 237 Test.Assert(binbuf.Append(base_seq));
219 binbuf.Dispose(); 238 binbuf.Dispose();
220 Test.Assert(binbuf.Handle == IntPtr.Zero); 239 Test.Assert(binbuf.Handle == IntPtr.Zero);
240 t.Dispose();
221 } 241 }
222 242
223 public static void test_eina_binbuf_return() 243 public static void test_eina_binbuf_return()
@@ -231,6 +251,7 @@ class TestEinaBinbuf
231 binbuf.Dispose(); 251 binbuf.Dispose();
232 Test.Assert(binbuf.Handle == IntPtr.Zero); 252 Test.Assert(binbuf.Handle == IntPtr.Zero);
233 Test.Assert(t.CheckBinbufReturn()); 253 Test.Assert(t.CheckBinbufReturn());
254 t.Dispose();
234 } 255 }
235 256
236 public static void test_eina_binbuf_return_own() 257 public static void test_eina_binbuf_return_own()
@@ -243,6 +264,7 @@ class TestEinaBinbuf
243 Test.Assert(binbuf.Append(base_seq)); 264 Test.Assert(binbuf.Append(base_seq));
244 binbuf.Dispose(); 265 binbuf.Dispose();
245 Test.Assert(binbuf.Handle == IntPtr.Zero); 266 Test.Assert(binbuf.Handle == IntPtr.Zero);
267 t.Dispose();
246 } 268 }
247 269
248 // // 270 // //
@@ -259,6 +281,7 @@ class TestEinaBinbuf
259 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33})); 281 new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
260 binbuf.Dispose(); 282 binbuf.Dispose();
261 Test.Assert(binbuf.Handle == IntPtr.Zero); 283 Test.Assert(binbuf.Handle == IntPtr.Zero);
284 t.Dispose();
262 } 285 }
263 286
264 public static void test_inherit_eina_binbuf_in_own() 287 public static void test_inherit_eina_binbuf_in_own()
@@ -273,6 +296,7 @@ class TestEinaBinbuf
273 binbuf.Dispose(); 296 binbuf.Dispose();
274 Test.Assert(binbuf.Handle == IntPtr.Zero); 297 Test.Assert(binbuf.Handle == IntPtr.Zero);
275 Test.Assert(t.binbuf_in_own_still_usable()); 298 Test.Assert(t.binbuf_in_own_still_usable());
299 t.Dispose();
276 } 300 }
277 301
278 public static void test_inherit_eina_binbuf_out() 302 public static void test_inherit_eina_binbuf_out()
@@ -286,6 +310,7 @@ class TestEinaBinbuf
286 binbuf.Dispose(); 310 binbuf.Dispose();
287 Test.Assert(binbuf.Handle == IntPtr.Zero); 311 Test.Assert(binbuf.Handle == IntPtr.Zero);
288 Test.Assert(t.binbuf_out_still_usable()); 312 Test.Assert(t.binbuf_out_still_usable());
313 t.Dispose();
289 } 314 }
290 315
291 public static void test_inherit_eina_binbuf_out_own() 316 public static void test_inherit_eina_binbuf_out_own()
@@ -299,6 +324,7 @@ class TestEinaBinbuf
299 binbuf.Dispose(); 324 binbuf.Dispose();
300 Test.Assert(binbuf.Handle == IntPtr.Zero); 325 Test.Assert(binbuf.Handle == IntPtr.Zero);
301 Test.Assert(t.binbuf_out_own_no_longer_own()); 326 Test.Assert(t.binbuf_out_own_no_longer_own());
327 t.Dispose();
302 } 328 }
303 329
304 public static void test_inherit_eina_binbuf_return() 330 public static void test_inherit_eina_binbuf_return()
@@ -312,6 +338,7 @@ class TestEinaBinbuf
312 binbuf.Dispose(); 338 binbuf.Dispose();
313 Test.Assert(binbuf.Handle == IntPtr.Zero); 339 Test.Assert(binbuf.Handle == IntPtr.Zero);
314 Test.Assert(t.binbuf_return_still_usable()); 340 Test.Assert(t.binbuf_return_still_usable());
341 t.Dispose();
315 } 342 }
316 343
317 public static void test_inherit_eina_binbuf_return_own() 344 public static void test_inherit_eina_binbuf_return_own()
@@ -325,6 +352,7 @@ class TestEinaBinbuf
325 binbuf.Dispose(); 352 binbuf.Dispose();
326 Test.Assert(binbuf.Handle == IntPtr.Zero); 353 Test.Assert(binbuf.Handle == IntPtr.Zero);
327 Test.Assert(t.binbuf_return_own_no_longer_own()); 354 Test.Assert(t.binbuf_return_own_no_longer_own());
355 t.Dispose();
328 } 356 }
329} 357}
330 358
@@ -346,6 +374,7 @@ class TestEinaSlice
346 374
347 Test.Assert(slc.GetBytes().SequenceEqual(base_seq)); 375 Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
348 Test.Assert(base_seq.Length == (int)(slc.Len)); 376 Test.Assert(base_seq.Length == (int)(slc.Len));
377 binbuf.Dispose();
349 } 378 }
350#endif 379#endif
351 380
@@ -361,6 +390,7 @@ class TestEinaSlice
361 var binbuf = new Eina.Binbuf(); 390 var binbuf = new Eina.Binbuf();
362 binbuf.Append(new Eina.Slice(pinnedPtr, (UIntPtr)3)); 391 binbuf.Append(new Eina.Slice(pinnedPtr, (UIntPtr)3));
363 Test.Assert(binbuf.GetBytes().SequenceEqual(base_seq)); 392 Test.Assert(binbuf.GetBytes().SequenceEqual(base_seq));
393 binbuf.Dispose();
364 } 394 }
365#endif 395#endif
366 396
@@ -369,6 +399,7 @@ class TestEinaSlice
369 var t = new Dummy.TestObject(); 399 var t = new Dummy.TestObject();
370 var slc = new Eina.Slice(pinnedPtr, (UIntPtr)3); 400 var slc = new Eina.Slice(pinnedPtr, (UIntPtr)3);
371 Test.Assert(t.EinaSliceIn(slc)); 401 Test.Assert(t.EinaSliceIn(slc));
402 t.Dispose();
372 } 403 }
373 404
374 public static void test_eina_rw_slice_in() 405 public static void test_eina_rw_slice_in()
@@ -385,6 +416,7 @@ class TestEinaSlice
385 Test.Assert(slc.GetBytes().SequenceEqual(new byte[3]{0x1, 0x2B, 0x43})); 416 Test.Assert(slc.GetBytes().SequenceEqual(new byte[3]{0x1, 0x2B, 0x43}));
386 417
387 pinnedRWData.Free(); 418 pinnedRWData.Free();
419 t.Dispose();
388 } 420 }
389 421
390 public static void test_eina_slice_out() 422 public static void test_eina_slice_out()
@@ -395,6 +427,7 @@ class TestEinaSlice
395 Test.Assert(slc.Mem != IntPtr.Zero); 427 Test.Assert(slc.Mem != IntPtr.Zero);
396 Test.Assert(slc.Length == base_seq.Length); 428 Test.Assert(slc.Length == base_seq.Length);
397 Test.Assert(slc.GetBytes().SequenceEqual(base_seq)); 429 Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
430 t.Dispose();
398 } 431 }
399 432
400 public static void test_eina_rw_slice_out() 433 public static void test_eina_rw_slice_out()
@@ -405,6 +438,7 @@ class TestEinaSlice
405 Test.Assert(slc.Mem != IntPtr.Zero); 438 Test.Assert(slc.Mem != IntPtr.Zero);
406 Test.Assert(slc.Length == base_seq.Length); 439 Test.Assert(slc.Length == base_seq.Length);
407 Test.Assert(slc.GetBytes().SequenceEqual(base_seq)); 440 Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
441 t.Dispose();
408 } 442 }
409 443
410 public static void test_eina_rw_slice_inout() 444 public static void test_eina_rw_slice_inout()
@@ -419,6 +453,7 @@ class TestEinaSlice
419 Test.Assert(slc.Mem != IntPtr.Zero); 453 Test.Assert(slc.Mem != IntPtr.Zero);
420 Test.Assert(slc.Length == rw_seq.Length); 454 Test.Assert(slc.Length == rw_seq.Length);
421 Test.Assert(slc.GetBytes().SequenceEqual(expected_seq)); 455 Test.Assert(slc.GetBytes().SequenceEqual(expected_seq));
456 t.Dispose();
422 } 457 }
423 458
424 /* 459 /*
@@ -437,6 +472,7 @@ class TestEinaSlice
437 var slc = new Eina.Slice(pinnedPtr, (UIntPtr)3); 472 var slc = new Eina.Slice(pinnedPtr, (UIntPtr)3);
438 Test.Assert(t.EinaSliceIn(slc)); 473 Test.Assert(t.EinaSliceIn(slc));
439 Test.Assert(t.slice_in_flag); 474 Test.Assert(t.slice_in_flag);
475 t.Dispose();
440 } 476 }
441 477
442 public static void test_inherit_eina_rw_slice_in() 478 public static void test_inherit_eina_rw_slice_in()
@@ -454,6 +490,7 @@ class TestEinaSlice
454 Test.Assert(slc.GetBytes().SequenceEqual(base_seq)); 490 Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
455 491
456 pinnedRWData.Free(); 492 pinnedRWData.Free();
493 t.Dispose();
457 } 494 }
458 495
459 public static void test_inherit_eina_slice_out() 496 public static void test_inherit_eina_slice_out()
@@ -465,6 +502,7 @@ class TestEinaSlice
465 Test.Assert(slc.Mem != IntPtr.Zero); 502 Test.Assert(slc.Mem != IntPtr.Zero);
466 Test.Assert(slc.Length == base_seq.Length); 503 Test.Assert(slc.Length == base_seq.Length);
467 Test.Assert(slc.GetBytes().SequenceEqual(base_seq)); 504 Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
505 t.Dispose();
468 } 506 }
469 507
470 public static void test_inherit_eina_rw_slice_out() 508 public static void test_inherit_eina_rw_slice_out()
@@ -476,6 +514,7 @@ class TestEinaSlice
476 Test.Assert(slc.Mem != IntPtr.Zero); 514 Test.Assert(slc.Mem != IntPtr.Zero);
477 Test.Assert(slc.Length == base_seq.Length); 515 Test.Assert(slc.Length == base_seq.Length);
478 Test.Assert(slc.GetBytes().SequenceEqual(base_seq)); 516 Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
517 t.Dispose();
479 } 518 }
480} 519}
481 520
@@ -495,6 +534,7 @@ class TestEinaArray
495 { 534 {
496 var a = new Eina.Array<int>(); 535 var a = new Eina.Array<int>();
497 Test.Assert(a.Handle != IntPtr.Zero); 536 Test.Assert(a.Handle != IntPtr.Zero);
537 a.Dispose();
498 } 538 }
499 539
500 public static void create_array_from_null() 540 public static void create_array_from_null()
@@ -509,6 +549,7 @@ class TestEinaArray
509 Test.Assert(a.Handle != IntPtr.Zero); 549 Test.Assert(a.Handle != IntPtr.Zero);
510 Test.Assert(a.Push(88)); 550 Test.Assert(a.Push(88));
511 Test.Assert(a[0] == 88); 551 Test.Assert(a[0] == 88);
552 a.Dispose();
512 } 553 }
513 554
514 public static void push_string() 555 public static void push_string()
@@ -517,6 +558,7 @@ class TestEinaArray
517 Test.Assert(a.Handle != IntPtr.Zero); 558 Test.Assert(a.Handle != IntPtr.Zero);
518 Test.Assert(a.Push("test string §éΨبÿツ")); 559 Test.Assert(a.Push("test string §éΨبÿツ"));
519 Test.AssertEquals("test string §éΨبÿツ", a[0]); 560 Test.AssertEquals("test string §éΨبÿツ", a[0]);
561 a.Dispose();
520 } 562 }
521 563
522 public static void push_stringshare() 564 public static void push_stringshare()
@@ -525,6 +567,7 @@ class TestEinaArray
525 Test.Assert(a.Handle != IntPtr.Zero); 567 Test.Assert(a.Handle != IntPtr.Zero);
526 Test.Assert(a.Push("test string §éΨبÿツ")); 568 Test.Assert(a.Push("test string §éΨبÿツ"));
527 Test.AssertEquals("test string §éΨبÿツ", a[0].Str); 569 Test.AssertEquals("test string §éΨبÿツ", a[0].Str);
570 a.Dispose();
528 } 571 }
529 572
530 public static void push_obj() 573 public static void push_obj()
@@ -536,6 +579,8 @@ class TestEinaArray
536 Test.Assert(a.Push(o)); 579 Test.Assert(a.Push(o));
537 Test.Assert(a[0].NativeHandle == o.NativeHandle); 580 Test.Assert(a[0].NativeHandle == o.NativeHandle);
538 Test.Assert(a[0].GetNumber() == 88); 581 Test.Assert(a[0].GetNumber() == 88);
582 o.Dispose();
583 a.Dispose();
539 } 584 }
540 585
541 public static void pop_int() 586 public static void pop_int()
@@ -545,6 +590,7 @@ class TestEinaArray
545 Test.Assert(a.Push(88)); 590 Test.Assert(a.Push(88));
546 Test.Assert(a.Pop() == 88); 591 Test.Assert(a.Pop() == 88);
547 Test.Assert(a.Count() == 0); 592 Test.Assert(a.Count() == 0);
593 a.Dispose();
548 } 594 }
549 595
550 public static void pop_string() 596 public static void pop_string()
@@ -554,6 +600,7 @@ class TestEinaArray
554 Test.Assert(a.Push("test string")); 600 Test.Assert(a.Push("test string"));
555 Test.Assert(a.Pop() == "test string"); 601 Test.Assert(a.Pop() == "test string");
556 Test.Assert(a.Count() == 0); 602 Test.Assert(a.Count() == 0);
603 a.Dispose();
557 } 604 }
558 605
559 public static void pop_stringshare() 606 public static void pop_stringshare()
@@ -563,6 +610,7 @@ class TestEinaArray
563 Test.Assert(a.Push("test string")); 610 Test.Assert(a.Push("test string"));
564 Test.Assert(a.Pop() == "test string"); 611 Test.Assert(a.Pop() == "test string");
565 Test.Assert(a.Count() == 0); 612 Test.Assert(a.Count() == 0);
613 a.Dispose();
566 } 614 }
567 615
568 public static void pop_obj() 616 public static void pop_obj()
@@ -576,6 +624,8 @@ class TestEinaArray
576 Test.Assert(p.NativeHandle == o.NativeHandle); 624 Test.Assert(p.NativeHandle == o.NativeHandle);
577 Test.Assert(p.GetNumber() == 88); 625 Test.Assert(p.GetNumber() == 88);
578 Test.Assert(a.Count() == 0); 626 Test.Assert(a.Count() == 0);
627 o.Dispose();
628 a.Dispose();
579 } 629 }
580 630
581 public static void data_set_int() 631 public static void data_set_int()
@@ -588,6 +638,7 @@ class TestEinaArray
588 Test.Assert(a[0] == 44); 638 Test.Assert(a[0] == 44);
589 a[0] = 22; 639 a[0] = 22;
590 Test.Assert(a[0] == 22); 640 Test.Assert(a[0] == 22);
641 a.Dispose();
591 } 642 }
592 643
593 public static void data_set_string() 644 public static void data_set_string()
@@ -600,6 +651,7 @@ class TestEinaArray
600 Test.Assert(a[0] == "other string"); 651 Test.Assert(a[0] == "other string");
601 a[0] = "abc"; 652 a[0] = "abc";
602 Test.Assert(a[0] == "abc"); 653 Test.Assert(a[0] == "abc");
654 a.Dispose();
603 } 655 }
604 656
605 public static void data_set_stringshare() 657 public static void data_set_stringshare()
@@ -612,6 +664,7 @@ class TestEinaArray
612 Test.Assert(a[0] == "other string"); 664 Test.Assert(a[0] == "other string");
613 a[0] = "abc"; 665 a[0] = "abc";
614 Test.Assert(a[0] == "abc"); 666 Test.Assert(a[0] == "abc");
667 a.Dispose();
615 } 668 }
616 669
617 public static void data_set_obj() 670 public static void data_set_obj()
@@ -639,6 +692,10 @@ class TestEinaArray
639 a[0] = o3; 692 a[0] = o3;
640 Test.Assert(a[0].NativeHandle == o3.NativeHandle); 693 Test.Assert(a[0].NativeHandle == o3.NativeHandle);
641 Test.Assert(a[0].GetNumber() == 22); 694 Test.Assert(a[0].GetNumber() == 22);
695 o3.Dispose();
696 o2.Dispose();
697 o1.Dispose();
698 a.Dispose();
642 } 699 }
643 700
644 public static void count_int() 701 public static void count_int()
@@ -655,6 +712,7 @@ class TestEinaArray
655 Test.Assert(a.Push(22)); 712 Test.Assert(a.Push(22));
656 Test.Assert(a[2] == 22); 713 Test.Assert(a[2] == 22);
657 Test.Assert(a.Count() == 3); 714 Test.Assert(a.Count() == 3);
715 a.Dispose();
658 } 716 }
659 717
660 public static void count_string() 718 public static void count_string()
@@ -671,6 +729,7 @@ class TestEinaArray
671 Test.Assert(a.Push("c")); 729 Test.Assert(a.Push("c"));
672 Test.Assert(a[2] == "c"); 730 Test.Assert(a[2] == "c");
673 Test.Assert(a.Count() == 3); 731 Test.Assert(a.Count() == 3);
732 a.Dispose();
674 } 733 }
675 734
676 public static void count_stringshare() 735 public static void count_stringshare()
@@ -687,6 +746,7 @@ class TestEinaArray
687 Test.Assert(a.Push("c")); 746 Test.Assert(a.Push("c"));
688 Test.Assert(a[2] == "c"); 747 Test.Assert(a[2] == "c");
689 Test.Assert(a.Count() == 3); 748 Test.Assert(a.Count() == 3);
749 a.Dispose();
690 } 750 }
691 751
692 public static void count_obj() 752 public static void count_obj()
@@ -716,6 +776,11 @@ class TestEinaArray
716 Test.Assert(a[2].NativeHandle == o3.NativeHandle); 776 Test.Assert(a[2].NativeHandle == o3.NativeHandle);
717 Test.Assert(a[2].GetNumber() == 22); 777 Test.Assert(a[2].GetNumber() == 22);
718 Test.Assert(a.Count() == 3); 778 Test.Assert(a.Count() == 3);
779
780 o3.Dispose();
781 o2.Dispose();
782 o1.Dispose();
783 a.Dispose();
719 } 784 }
720 785
721 public static void length_int() 786 public static void length_int()
@@ -732,6 +797,7 @@ class TestEinaArray
732 Test.Assert(a.Push(22)); 797 Test.Assert(a.Push(22));
733 Test.Assert(a[2] == 22); 798 Test.Assert(a[2] == 22);
734 Test.Assert(a.Length == 3); 799 Test.Assert(a.Length == 3);
800 a.Dispose();
735 } 801 }
736 802
737 public static void length_string() 803 public static void length_string()
@@ -748,6 +814,7 @@ class TestEinaArray
748 Test.Assert(a.Push("c")); 814 Test.Assert(a.Push("c"));
749 Test.Assert(a[2] == "c"); 815 Test.Assert(a[2] == "c");
750 Test.Assert(a.Length == 3); 816 Test.Assert(a.Length == 3);
817 a.Dispose();
751 } 818 }
752 819
753 public static void length_stringshare() 820 public static void length_stringshare()
@@ -764,6 +831,7 @@ class TestEinaArray
764 Test.Assert(a.Push("c")); 831 Test.Assert(a.Push("c"));
765 Test.Assert(a[2] == "c"); 832 Test.Assert(a[2] == "c");
766 Test.Assert(a.Length == 3); 833 Test.Assert(a.Length == 3);
834 a.Dispose();
767 } 835 }
768 836
769 public static void eina_array_as_ienumerable_int() 837 public static void eina_array_as_ienumerable_int()
@@ -780,6 +848,7 @@ class TestEinaArray
780 Test.AssertEquals(cmp, e); 848 Test.AssertEquals(cmp, e);
781 cmp /= 2; 849 cmp /= 2;
782 } 850 }
851 a.Dispose();
783 } 852 }
784 853
785 public static void eina_array_as_ienumerable_string() 854 public static void eina_array_as_ienumerable_string()
@@ -796,6 +865,7 @@ class TestEinaArray
796 Test.AssertEquals(cmp, e); 865 Test.AssertEquals(cmp, e);
797 cmp = cmp + "X"; 866 cmp = cmp + "X";
798 } 867 }
868 a.Dispose();
799 } 869 }
800 870
801 public static void eina_array_as_ienumerable_stringshare() 871 public static void eina_array_as_ienumerable_stringshare()
@@ -812,6 +882,7 @@ class TestEinaArray
812 Test.AssertEquals(cmp, e); 882 Test.AssertEquals(cmp, e);
813 cmp = cmp + "X"; 883 cmp = cmp + "X";
814 } 884 }
885 a.Dispose();
815 } 886 }
816 887
817 public static void eina_array_as_ienumerable_obj() 888 public static void eina_array_as_ienumerable_obj()
@@ -837,6 +908,7 @@ class TestEinaArray
837 Test.Assert(cmp[i].NativeHandle == e.NativeHandle); 908 Test.Assert(cmp[i].NativeHandle == e.NativeHandle);
838 ++i; 909 ++i;
839 } 910 }
911 arr.Dispose();
840 } 912 }
841 913
842 // // 914 // //
@@ -855,6 +927,7 @@ class TestEinaArray
855 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int)); 927 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int));
856 arr.Dispose(); 928 arr.Dispose();
857 Test.Assert(arr.Handle == IntPtr.Zero); 929 Test.Assert(arr.Handle == IntPtr.Zero);
930 t.Dispose();
858 } 931 }
859 932
860 public static void test_eina_array_int_in_own() 933 public static void test_eina_array_int_in_own()
@@ -868,6 +941,7 @@ class TestEinaArray
868 arr.Dispose(); 941 arr.Dispose();
869 Test.Assert(arr.Handle == IntPtr.Zero); 942 Test.Assert(arr.Handle == IntPtr.Zero);
870 Test.Assert(t.CheckEinaArrayIntInOwn()); 943 Test.Assert(t.CheckEinaArrayIntInOwn());
944 t.Dispose();
871 } 945 }
872 946
873 public static void test_eina_array_int_out() 947 public static void test_eina_array_int_out()
@@ -881,6 +955,7 @@ class TestEinaArray
881 arr.Dispose(); 955 arr.Dispose();
882 Test.Assert(arr.Handle == IntPtr.Zero); 956 Test.Assert(arr.Handle == IntPtr.Zero);
883 Test.Assert(t.CheckEinaArrayIntOut()); 957 Test.Assert(t.CheckEinaArrayIntOut());
958 t.Dispose();
884 } 959 }
885 960
886 public static void test_eina_array_int_out_own() 961 public static void test_eina_array_int_out_own()
@@ -893,6 +968,7 @@ class TestEinaArray
893 Test.Assert(arr.Append(append_seq_int)); 968 Test.Assert(arr.Append(append_seq_int));
894 arr.Dispose(); 969 arr.Dispose();
895 Test.Assert(arr.Handle == IntPtr.Zero); 970 Test.Assert(arr.Handle == IntPtr.Zero);
971 t.Dispose();
896 } 972 }
897 973
898 public static void test_eina_array_int_return() 974 public static void test_eina_array_int_return()
@@ -905,6 +981,7 @@ class TestEinaArray
905 arr.Dispose(); 981 arr.Dispose();
906 Test.Assert(arr.Handle == IntPtr.Zero); 982 Test.Assert(arr.Handle == IntPtr.Zero);
907 Test.Assert(t.CheckEinaArrayIntReturn()); 983 Test.Assert(t.CheckEinaArrayIntReturn());
984 t.Dispose();
908 } 985 }
909 986
910 public static void test_eina_array_int_return_own() 987 public static void test_eina_array_int_return_own()
@@ -916,6 +993,7 @@ class TestEinaArray
916 Test.Assert(arr.Append(append_seq_int)); 993 Test.Assert(arr.Append(append_seq_int));
917 arr.Dispose(); 994 arr.Dispose();
918 Test.Assert(arr.Handle == IntPtr.Zero); 995 Test.Assert(arr.Handle == IntPtr.Zero);
996 t.Dispose();
919 } 997 }
920 998
921 // String // 999 // String //
@@ -929,6 +1007,7 @@ class TestEinaArray
929 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str)); 1007 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str));
930 arr.Dispose(); 1008 arr.Dispose();
931 Test.Assert(arr.Handle == IntPtr.Zero); 1009 Test.Assert(arr.Handle == IntPtr.Zero);
1010 t.Dispose();
932 } 1011 }
933 1012
934 public static void test_eina_array_str_in_own() 1013 public static void test_eina_array_str_in_own()
@@ -942,6 +1021,7 @@ class TestEinaArray
942 arr.Dispose(); 1021 arr.Dispose();
943 Test.Assert(arr.Handle == IntPtr.Zero); 1022 Test.Assert(arr.Handle == IntPtr.Zero);
944 Test.Assert(t.CheckEinaArrayStrInOwn()); 1023 Test.Assert(t.CheckEinaArrayStrInOwn());
1024 t.Dispose();
945 } 1025 }
946 1026
947 public static void test_eina_array_str_out() 1027 public static void test_eina_array_str_out()
@@ -955,6 +1035,7 @@ class TestEinaArray
955 arr.Dispose(); 1035 arr.Dispose();
956 Test.Assert(arr.Handle == IntPtr.Zero); 1036 Test.Assert(arr.Handle == IntPtr.Zero);
957 Test.Assert(t.CheckEinaArrayStrOut()); 1037 Test.Assert(t.CheckEinaArrayStrOut());
1038 t.Dispose();
958 } 1039 }
959 1040
960 public static void test_eina_array_str_out_own() 1041 public static void test_eina_array_str_out_own()
@@ -967,6 +1048,7 @@ class TestEinaArray
967 Test.Assert(arr.Append(append_seq_str)); 1048 Test.Assert(arr.Append(append_seq_str));
968 arr.Dispose(); 1049 arr.Dispose();
969 Test.Assert(arr.Handle == IntPtr.Zero); 1050 Test.Assert(arr.Handle == IntPtr.Zero);
1051 t.Dispose();
970 } 1052 }
971 1053
972 public static void test_eina_array_str_return() 1054 public static void test_eina_array_str_return()
@@ -979,6 +1061,7 @@ class TestEinaArray
979 arr.Dispose(); 1061 arr.Dispose();
980 Test.Assert(arr.Handle == IntPtr.Zero); 1062 Test.Assert(arr.Handle == IntPtr.Zero);
981 Test.Assert(t.CheckEinaArrayStrReturn()); 1063 Test.Assert(t.CheckEinaArrayStrReturn());
1064 t.Dispose();
982 } 1065 }
983 1066
984 public static void test_eina_array_str_return_own() 1067 public static void test_eina_array_str_return_own()
@@ -990,6 +1073,7 @@ class TestEinaArray
990 Test.Assert(arr.Append(append_seq_str)); 1073 Test.Assert(arr.Append(append_seq_str));
991 arr.Dispose(); 1074 arr.Dispose();
992 Test.Assert(arr.Handle == IntPtr.Zero); 1075 Test.Assert(arr.Handle == IntPtr.Zero);
1076 t.Dispose();
993 } 1077 }
994 1078
995 // Eina.Stringshare // 1079 // Eina.Stringshare //
@@ -1003,6 +1087,7 @@ class TestEinaArray
1003 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_strshare)); 1087 Test.Assert(arr.ToArray().SequenceEqual(modified_seq_strshare));
1004 arr.Dispose(); 1088 arr.Dispose();
1005 Test.Assert(arr.Handle == IntPtr.Zero); 1089 Test.Assert(arr.Handle == IntPtr.Zero);
1090 t.Dispose();
1006 } 1091 }
1007 1092
1008 public static void test_eina_array_strshare_in_own() 1093 public static void test_eina_array_strshare_in_own()
@@ -1016,6 +1101,7 @@ class TestEinaArray
1016 arr.Dispose(); 1101 arr.Dispose();
1017 Test.Assert(arr.Handle == IntPtr.Zero); 1102 Test.Assert(arr.Handle == IntPtr.Zero);
1018 Test.Assert(t.CheckEinaArrayStrshareInOwn()); 1103 Test.Assert(t.CheckEinaArrayStrshareInOwn());
1104 t.Dispose();
1019 } 1105 }
1020 1106
1021 public static void test_eina_array_strshare_out() 1107 public static void test_eina_array_strshare_out()
@@ -1029,6 +1115,7 @@ class TestEinaArray
1029 arr.Dispose(); 1115 arr.Dispose();
1030 Test.Assert(arr.Handle == IntPtr.Zero); 1116 Test.Assert(arr.Handle == IntPtr.Zero);
1031 Test.Assert(t.CheckEinaArrayStrshareOut()); 1117 Test.Assert(t.CheckEinaArrayStrshareOut());
1118 t.Dispose();
1032 } 1119 }
1033 1120
1034 public static void test_eina_array_strshare_out_own() 1121 public static void test_eina_array_strshare_out_own()
@@ -1041,6 +1128,7 @@ class TestEinaArray
1041 Test.Assert(arr.Append(append_seq_strshare)); 1128 Test.Assert(arr.Append(append_seq_strshare));
1042 arr.Dispose(); 1129 arr.Dispose();
1043 Test.Assert(arr.Handle == IntPtr.Zero); 1130 Test.Assert(arr.Handle == IntPtr.Zero);
1131 t.Dispose();
1044 } 1132 }
1045 1133
1046 public static void test_eina_array_strshare_return() 1134 public static void test_eina_array_strshare_return()
@@ -1053,6 +1141,7 @@ class TestEinaArray
1053 arr.Dispose(); 1141 arr.Dispose();
1054 Test.Assert(arr.Handle == IntPtr.Zero); 1142 Test.Assert(arr.Handle == IntPtr.Zero);
1055 Test.Assert(t.CheckEinaArrayStrshareReturn()); 1143 Test.Assert(t.CheckEinaArrayStrshareReturn());
1144 t.Dispose();
1056 } 1145 }
1057 1146
1058 public static void test_eina_array_strshare_return_own() 1147 public static void test_eina_array_strshare_return_own()
@@ -1064,6 +1153,7 @@ class TestEinaArray
1064 Test.Assert(arr.Append(append_seq_strshare)); 1153 Test.Assert(arr.Append(append_seq_strshare));
1065 arr.Dispose(); 1154 arr.Dispose();
1066 Test.Assert(arr.Handle == IntPtr.Zero); 1155 Test.Assert(arr.Handle == IntPtr.Zero);
1156 t.Dispose();
1067 } 1157 }
1068 1158
1069 // Object // 1159 // Object //
@@ -1078,6 +1168,7 @@ class TestEinaArray
1078 NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj()); 1168 NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj());
1079 arr.Dispose(); 1169 arr.Dispose();
1080 Test.Assert(arr.Handle == IntPtr.Zero); 1170 Test.Assert(arr.Handle == IntPtr.Zero);
1171 t.Dispose();
1081 } 1172 }
1082 1173
1083 public static void test_eina_array_obj_in_own() 1174 public static void test_eina_array_obj_in_own()
@@ -1091,6 +1182,7 @@ class TestEinaArray
1091 arr.Dispose(); 1182 arr.Dispose();
1092 Test.Assert(arr.Handle == IntPtr.Zero); 1183 Test.Assert(arr.Handle == IntPtr.Zero);
1093 Test.Assert(t.CheckEinaArrayObjInOwn()); 1184 Test.Assert(t.CheckEinaArrayObjInOwn());
1185 t.Dispose();
1094 } 1186 }
1095 1187
1096 public static void test_eina_array_obj_out() 1188 public static void test_eina_array_obj_out()
@@ -1104,6 +1196,7 @@ class TestEinaArray
1104 arr.Dispose(); 1196 arr.Dispose();
1105 Test.Assert(arr.Handle == IntPtr.Zero); 1197 Test.Assert(arr.Handle == IntPtr.Zero);
1106 Test.Assert(t.CheckEinaArrayObjOut()); 1198 Test.Assert(t.CheckEinaArrayObjOut());
1199 t.Dispose();
1107 } 1200 }
1108 1201
1109 public static void test_eina_array_obj_out_own() 1202 public static void test_eina_array_obj_out_own()
@@ -1116,6 +1209,7 @@ class TestEinaArray
1116 Test.Assert(arr.Append(AppendSeqObj())); 1209 Test.Assert(arr.Append(AppendSeqObj()));
1117 arr.Dispose(); 1210 arr.Dispose();
1118 Test.Assert(arr.Handle == IntPtr.Zero); 1211 Test.Assert(arr.Handle == IntPtr.Zero);
1212 t.Dispose();
1119 } 1213 }
1120 1214
1121 public static void test_eina_array_obj_return() 1215 public static void test_eina_array_obj_return()
@@ -1128,6 +1222,7 @@ class TestEinaArray
1128 arr.Dispose(); 1222 arr.Dispose();
1129 Test.Assert(arr.Handle == IntPtr.Zero); 1223 Test.Assert(arr.Handle == IntPtr.Zero);
1130 Test.Assert(t.CheckEinaArrayObjReturn()); 1224 Test.Assert(t.CheckEinaArrayObjReturn());
1225 t.Dispose();
1131 } 1226 }
1132 1227
1133 public static void test_eina_array_obj_return_own() 1228 public static void test_eina_array_obj_return_own()
@@ -1139,6 +1234,7 @@ class TestEinaArray
1139 Test.Assert(arr.Append(AppendSeqObj())); 1234 Test.Assert(arr.Append(AppendSeqObj()));
1140 arr.Dispose(); 1235 arr.Dispose();
1141 Test.Assert(arr.Handle == IntPtr.Zero); 1236 Test.Assert(arr.Handle == IntPtr.Zero);
1237 t.Dispose();
1142 } 1238 }
1143 1239
1144 public static void test_eina_array_obj_return_in_same_id() 1240 public static void test_eina_array_obj_return_in_same_id()
@@ -1156,6 +1252,8 @@ class TestEinaArray
1156 Test.Assert(a[i].NativeHandle == b[i].NativeHandle); 1252 Test.Assert(a[i].NativeHandle == b[i].NativeHandle);
1157 Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle); 1253 Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle);
1158 } 1254 }
1255 a.Dispose();
1256 t.Dispose();
1159 } 1257 }
1160 1258
1161 1259
@@ -1200,6 +1298,7 @@ class TestEinaInarray
1200 Test.Assert(a.Push(o) == 0); 1298 Test.Assert(a.Push(o) == 0);
1201 Test.Assert(a[0].NativeHandle == o.NativeHandle); 1299 Test.Assert(a[0].NativeHandle == o.NativeHandle);
1202 Test.Assert(a[0].GetNumber() == 88); 1300 Test.Assert(a[0].GetNumber() == 88);
1301 o.Dispose();
1203 a.Dispose(); 1302 a.Dispose();
1204 } 1303 }
1205 1304
@@ -1234,6 +1333,7 @@ class TestEinaInarray
1234 Test.Assert(p.NativeHandle == o.NativeHandle); 1333 Test.Assert(p.NativeHandle == o.NativeHandle);
1235 Test.Assert(p.GetNumber() == 88); 1334 Test.Assert(p.GetNumber() == 88);
1236 Test.Assert(a.Count() == 0); 1335 Test.Assert(a.Count() == 0);
1336 o.Dispose();
1237 a.Dispose(); 1337 a.Dispose();
1238 } 1338 }
1239 1339
@@ -1295,6 +1395,9 @@ class TestEinaInarray
1295 Test.Assert(a[0].GetNumber() == 22); 1395 Test.Assert(a[0].GetNumber() == 22);
1296 Test.Assert(a.Count() == 1); 1396 Test.Assert(a.Count() == 1);
1297 1397
1398 o3.Dispose();
1399 o2.Dispose();
1400 o1.Dispose();
1298 a.Dispose(); 1401 a.Dispose();
1299 } 1402 }
1300 1403
@@ -1360,6 +1463,9 @@ class TestEinaInarray
1360 Test.Assert(a[2].GetNumber() == 22); 1463 Test.Assert(a[2].GetNumber() == 22);
1361 Test.Assert(a.Count() == 3); 1464 Test.Assert(a.Count() == 3);
1362 1465
1466 o3.Dispose();
1467 o2.Dispose();
1468 o1.Dispose();
1363 a.Dispose(); 1469 a.Dispose();
1364 } 1470 }
1365 1471
@@ -1480,6 +1586,7 @@ class TestEinaList
1480 Test.Assert(lst[0] == 44); 1586 Test.Assert(lst[0] == 44);
1481 lst[0] = 22; 1587 lst[0] = 22;
1482 Test.Assert(lst[0] == 22); 1588 Test.Assert(lst[0] == 22);
1589 lst.Dispose();
1483 } 1590 }
1484 1591
1485 public static void data_set_string() 1592 public static void data_set_string()
@@ -1491,6 +1598,7 @@ class TestEinaList
1491 Test.Assert(lst[0] == "other string"); 1598 Test.Assert(lst[0] == "other string");
1492 lst[0] = "abc"; 1599 lst[0] = "abc";
1493 Test.Assert(lst[0] == "abc"); 1600 Test.Assert(lst[0] == "abc");
1601 lst.Dispose();
1494 } 1602 }
1495 1603
1496 public static void data_set_stringshare() 1604 public static void data_set_stringshare()
@@ -1502,6 +1610,7 @@ class TestEinaList
1502 Test.Assert(lst[0] == "other string"); 1610 Test.Assert(lst[0] == "other string");
1503 lst[0] = "abc"; 1611 lst[0] = "abc";
1504 Test.Assert(lst[0] == "abc"); 1612 Test.Assert(lst[0] == "abc");
1613 lst.Dispose();
1505 } 1614 }
1506 1615
1507 public static void data_set_obj() 1616 public static void data_set_obj()
@@ -1528,6 +1637,10 @@ class TestEinaList
1528 lst[0] = o3; 1637 lst[0] = o3;
1529 Test.Assert(lst[0].NativeHandle == o3.NativeHandle); 1638 Test.Assert(lst[0].NativeHandle == o3.NativeHandle);
1530 Test.Assert(lst[0].GetNumber() == 22); 1639 Test.Assert(lst[0].GetNumber() == 22);
1640 o3.Dispose();
1641 o2.Dispose();
1642 o1.Dispose();
1643 lst.Dispose();
1531 } 1644 }
1532 1645
1533 public static void append_count_int() 1646 public static void append_count_int()
@@ -1543,6 +1656,7 @@ class TestEinaList
1543 lst.Append(22); 1656 lst.Append(22);
1544 Test.Assert(lst[2] == 22); 1657 Test.Assert(lst[2] == 22);
1545 Test.Assert(lst.Count() == 3); 1658 Test.Assert(lst.Count() == 3);
1659 lst.Dispose();
1546 } 1660 }
1547 1661
1548 public static void append_count_string() 1662 public static void append_count_string()
@@ -1558,6 +1672,7 @@ class TestEinaList
1558 lst.Append("c"); 1672 lst.Append("c");
1559 Test.Assert(lst[2] == "c"); 1673 Test.Assert(lst[2] == "c");
1560 Test.Assert(lst.Count() == 3); 1674 Test.Assert(lst.Count() == 3);
1675 lst.Dispose();
1561 } 1676 }
1562 1677
1563 public static void append_count_stringshare() 1678 public static void append_count_stringshare()
@@ -1573,6 +1688,7 @@ class TestEinaList
1573 lst.Append("c"); 1688 lst.Append("c");
1574 Test.Assert(lst[2] == "c"); 1689 Test.Assert(lst[2] == "c");
1575 Test.Assert(lst.Count() == 3); 1690 Test.Assert(lst.Count() == 3);
1691 lst.Dispose();
1576 } 1692 }
1577 1693
1578 public static void append_count_obj() 1694 public static void append_count_obj()
@@ -1601,6 +1717,10 @@ class TestEinaList
1601 Test.Assert(lst[2].NativeHandle == o3.NativeHandle); 1717 Test.Assert(lst[2].NativeHandle == o3.NativeHandle);
1602 Test.Assert(lst[2].GetNumber() == 22); 1718 Test.Assert(lst[2].GetNumber() == 22);
1603 Test.Assert(lst.Count() == 3); 1719 Test.Assert(lst.Count() == 3);
1720 o3.Dispose();
1721 o2.Dispose();
1722 o1.Dispose();
1723 lst.Dispose();
1604 } 1724 }
1605 1725
1606 public static void length_int() 1726 public static void length_int()
@@ -1616,6 +1736,7 @@ class TestEinaList
1616 lst.Append(22); 1736 lst.Append(22);
1617 Test.Assert(lst[2] == 22); 1737 Test.Assert(lst[2] == 22);
1618 Test.Assert(lst.Length == 3); 1738 Test.Assert(lst.Length == 3);
1739 lst.Dispose();
1619 } 1740 }
1620 1741
1621 public static void length_string() 1742 public static void length_string()
@@ -1631,6 +1752,7 @@ class TestEinaList
1631 lst.Append("c"); 1752 lst.Append("c");
1632 Test.Assert(lst[2] == "c"); 1753 Test.Assert(lst[2] == "c");
1633 Test.Assert(lst.Length == 3); 1754 Test.Assert(lst.Length == 3);
1755 lst.Dispose();
1634 } 1756 }
1635 1757
1636 public static void length_stringshare() 1758 public static void length_stringshare()
@@ -1646,6 +1768,7 @@ class TestEinaList
1646 lst.Append("c"); 1768 lst.Append("c");
1647 Test.Assert(lst[2] == "c"); 1769 Test.Assert(lst[2] == "c");
1648 Test.Assert(lst.Length == 3); 1770 Test.Assert(lst.Length == 3);
1771 lst.Dispose();
1649 } 1772 }
1650 1773
1651 public static void prepend_count_int() 1774 public static void prepend_count_int()
@@ -1661,6 +1784,7 @@ class TestEinaList
1661 lst.Prepend(22); 1784 lst.Prepend(22);
1662 Test.Assert(lst[0] == 22); 1785 Test.Assert(lst[0] == 22);
1663 Test.Assert(lst.Count() == 3); 1786 Test.Assert(lst.Count() == 3);
1787 lst.Dispose();
1664 } 1788 }
1665 1789
1666 public static void prepend_count_string() 1790 public static void prepend_count_string()
@@ -1676,6 +1800,7 @@ class TestEinaList
1676 lst.Prepend("c"); 1800 lst.Prepend("c");
1677 Test.Assert(lst[0] == "c"); 1801 Test.Assert(lst[0] == "c");
1678 Test.Assert(lst.Count() == 3); 1802 Test.Assert(lst.Count() == 3);
1803 lst.Dispose();
1679 } 1804 }
1680 1805
1681 public static void prepend_count_stringshare() 1806 public static void prepend_count_stringshare()
@@ -1691,6 +1816,7 @@ class TestEinaList
1691 lst.Prepend("c"); 1816 lst.Prepend("c");
1692 Test.Assert(lst[0] == "c"); 1817 Test.Assert(lst[0] == "c");
1693 Test.Assert(lst.Count() == 3); 1818 Test.Assert(lst.Count() == 3);
1819 lst.Dispose();
1694 } 1820 }
1695 1821
1696 public static void prepend_count_obj() 1822 public static void prepend_count_obj()
@@ -1719,6 +1845,11 @@ class TestEinaList
1719 Test.Assert(lst[0].NativeHandle == o3.NativeHandle); 1845 Test.Assert(lst[0].NativeHandle == o3.NativeHandle);
1720 Test.Assert(lst[0].GetNumber() == 22); 1846 Test.Assert(lst[0].GetNumber() == 22);
1721 Test.Assert(lst.Count() == 3); 1847 Test.Assert(lst.Count() == 3);
1848
1849 o3.Dispose();
1850 o2.Dispose();
1851 o1.Dispose();
1852 lst.Dispose();
1722 } 1853 }
1723 1854
1724 public static void sorted_insert_int() 1855 public static void sorted_insert_int()
@@ -1730,6 +1861,7 @@ class TestEinaList
1730 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 88})); 1861 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 88}));
1731 lst.SortedInsert(44); 1862 lst.SortedInsert(44);
1732 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88})); 1863 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88}));
1864 lst.Dispose();
1733 } 1865 }
1734 1866
1735 public static void sorted_insert_string() 1867 public static void sorted_insert_string()
@@ -1741,6 +1873,7 @@ class TestEinaList
1741 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "c"})); 1873 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "c"}));
1742 lst.SortedInsert("b"); 1874 lst.SortedInsert("b");
1743 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"})); 1875 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"}));
1876 lst.Dispose();
1744 } 1877 }
1745 1878
1746 public static void sorted_insert_stringshare() 1879 public static void sorted_insert_stringshare()
@@ -1754,6 +1887,7 @@ class TestEinaList
1754 lst.SortedInsert("b"); 1887 lst.SortedInsert("b");
1755 Test.Assert( 1888 Test.Assert(
1756 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a", "b", "c"})); 1889 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a", "b", "c"}));
1890 lst.Dispose();
1757 } 1891 }
1758 1892
1759 public static void sorted_insert_custom_comparer_natural() 1893 public static void sorted_insert_custom_comparer_natural()
@@ -1769,6 +1903,7 @@ class TestEinaList
1769 Test.Assert(lst.ToArray().SequenceEqual(new int[]{1, 2, 3})); 1903 Test.Assert(lst.ToArray().SequenceEqual(new int[]{1, 2, 3}));
1770 lst.SortedInsert(comparator, -1); 1904 lst.SortedInsert(comparator, -1);
1771 Test.Assert(lst.ToArray().SequenceEqual(new int[]{-1, 1, 2, 3})); 1905 Test.Assert(lst.ToArray().SequenceEqual(new int[]{-1, 1, 2, 3}));
1906 lst.Dispose();
1772 } 1907 }
1773 1908
1774 public static void sorted_insert_custom_comparer_reversed() 1909 public static void sorted_insert_custom_comparer_reversed()
@@ -1784,6 +1919,7 @@ class TestEinaList
1784 Test.Assert(lst.ToArray().SequenceEqual(new int[]{3, 2, 1})); 1919 Test.Assert(lst.ToArray().SequenceEqual(new int[]{3, 2, 1}));
1785 lst.SortedInsert(comparator, -1); 1920 lst.SortedInsert(comparator, -1);
1786 Test.Assert(lst.ToArray().SequenceEqual(new int[]{3, 2, 1, -1})); 1921 Test.Assert(lst.ToArray().SequenceEqual(new int[]{3, 2, 1, -1}));
1922 lst.Dispose();
1787 } 1923 }
1788 1924
1789 public static void sorted_insert_custom_comparer_string() 1925 public static void sorted_insert_custom_comparer_string()
@@ -1799,6 +1935,7 @@ class TestEinaList
1799 lst.SortedInsert(comparator, "Jumped"); 1935 lst.SortedInsert(comparator, "Jumped");
1800 Test.Assert(lst.ToArray().SequenceEqual( 1936 Test.Assert(lst.ToArray().SequenceEqual(
1801 new string[]{"Jumped", "Brown", "Quick", "The"})); 1937 new string[]{"Jumped", "Brown", "Quick", "The"}));
1938 lst.Dispose();
1802 } 1939 }
1803 1940
1804 public static void sort_int() 1941 public static void sort_int()
@@ -1811,6 +1948,7 @@ class TestEinaList
1811 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 22, 11, 44})); 1948 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 22, 11, 44}));
1812 lst.Sort(); 1949 lst.Sort();
1813 Test.Assert(lst.ToArray().SequenceEqual(new int[]{11, 22, 44, 88})); 1950 Test.Assert(lst.ToArray().SequenceEqual(new int[]{11, 22, 44, 88}));
1951 lst.Dispose();
1814 } 1952 }
1815 1953
1816 public static void sort_string() 1954 public static void sort_string()
@@ -1825,6 +1963,7 @@ class TestEinaList
1825 lst.Sort(); 1963 lst.Sort();
1826 Test.Assert( 1964 Test.Assert(
1827 lst.ToArray().SequenceEqual(new string[]{"a", "b", "c", "d"})); 1965 lst.ToArray().SequenceEqual(new string[]{"a", "b", "c", "d"}));
1966 lst.Dispose();
1828 } 1967 }
1829 1968
1830 public static void sort_stringshare() 1969 public static void sort_stringshare()
@@ -1839,6 +1978,7 @@ class TestEinaList
1839 lst.Sort(); 1978 lst.Sort();
1840 Test.Assert(lst.ToArray().SequenceEqual( 1979 Test.Assert(lst.ToArray().SequenceEqual(
1841 new Eina.Stringshare[]{"a", "b", "c", "d"})); 1980 new Eina.Stringshare[]{"a", "b", "c", "d"}));
1981 lst.Dispose();
1842 } 1982 }
1843 1983
1844 public static void reverse_int() 1984 public static void reverse_int()
@@ -1850,6 +1990,7 @@ class TestEinaList
1850 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88})); 1990 Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88}));
1851 lst.Reverse(); 1991 lst.Reverse();
1852 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 44, 22})); 1992 Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 44, 22}));
1993 lst.Dispose();
1853 } 1994 }
1854 1995
1855 public static void reverse_string() 1996 public static void reverse_string()
@@ -1861,6 +2002,7 @@ class TestEinaList
1861 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"})); 2002 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"}));
1862 lst.Reverse(); 2003 lst.Reverse();
1863 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c", "b", "a"})); 2004 Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c", "b", "a"}));
2005 lst.Dispose();
1864 } 2006 }
1865 2007
1866 public static void reverse_stringshare() 2008 public static void reverse_stringshare()
@@ -1874,6 +2016,7 @@ class TestEinaList
1874 lst.Reverse(); 2016 lst.Reverse();
1875 Test.Assert( 2017 Test.Assert(
1876 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c", "b", "a"})); 2018 lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c", "b", "a"}));
2019 lst.Dispose();
1877 } 2020 }
1878 2021
1879 public static void eina_list_as_ienumerable_int() 2022 public static void eina_list_as_ienumerable_int()
@@ -1889,6 +2032,7 @@ class TestEinaList
1889 Test.AssertEquals(cmp, e); 2032 Test.AssertEquals(cmp, e);
1890 cmp /= 2; 2033 cmp /= 2;
1891 } 2034 }
2035 lst.Dispose();
1892 } 2036 }
1893 2037
1894 public static void eina_list_as_ienumerable_string() 2038 public static void eina_list_as_ienumerable_string()
@@ -1904,6 +2048,7 @@ class TestEinaList
1904 Test.AssertEquals(cmp, e); 2048 Test.AssertEquals(cmp, e);
1905 cmp = cmp + "X"; 2049 cmp = cmp + "X";
1906 } 2050 }
2051 lst.Dispose();
1907 } 2052 }
1908 2053
1909 public static void eina_list_as_ienumerable_stringshare() 2054 public static void eina_list_as_ienumerable_stringshare()
@@ -1919,6 +2064,7 @@ class TestEinaList
1919 Test.AssertEquals(cmp, e); 2064 Test.AssertEquals(cmp, e);
1920 cmp = cmp + "X"; 2065 cmp = cmp + "X";
1921 } 2066 }
2067 lst.Dispose();
1922 } 2068 }
1923 2069
1924 public static void eina_list_as_ienumerable_obj() 2070 public static void eina_list_as_ienumerable_obj()
@@ -1943,6 +2089,7 @@ class TestEinaList
1943 Test.Assert(cmp[i].NativeHandle == e.NativeHandle); 2089 Test.Assert(cmp[i].NativeHandle == e.NativeHandle);
1944 ++i; 2090 ++i;
1945 } 2091 }
2092 lst.Dispose();
1946 } 2093 }
1947 2094
1948 // // 2095 // //
@@ -1961,6 +2108,7 @@ class TestEinaList
1961 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int)); 2108 Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
1962 lst.Dispose(); 2109 lst.Dispose();
1963 Test.Assert(lst.Handle == IntPtr.Zero); 2110 Test.Assert(lst.Handle == IntPtr.Zero);
2111 t.Dispose();
1964 } 2112 }
1965 2113
1966 public static void test_eina_list_int_in_own() 2114 public static void test_eina_list_int_in_own()
@@ -1973,6 +2121,7 @@ class TestEinaList
1973 lst.Dispose(); 2121 lst.Dispose();
1974 Test.Assert(lst.Handle == IntPtr.Zero); 2122 Test.Assert(lst.Handle == IntPtr.Zero);
1975 Test.Assert(t.CheckEinaListIntInOwn()); 2123 Test.Assert(t.CheckEinaListIntInOwn());
2124 t.Dispose();
1976 } 2125 }
1977 2126
1978 public static void test_eina_list_int_out() 2127 public static void test_eina_list_int_out()
@@ -1985,6 +2134,7 @@ class TestEinaList
1985 lst.Dispose(); 2134 lst.Dispose();
1986 Test.Assert(lst.Handle == IntPtr.Zero); 2135 Test.Assert(lst.Handle == IntPtr.Zero);
1987 Test.Assert(t.CheckEinaListIntOut()); 2136 Test.Assert(t.CheckEinaListIntOut());
2137 t.Dispose();
1988 } 2138 }
1989 2139
1990 public static void test_eina_list_int_out_own() 2140 public static void test_eina_list_int_out_own()
@@ -1997,6 +2147,7 @@ class TestEinaList
1997 lst.AppendArray(append_seq_int); 2147 lst.AppendArray(append_seq_int);
1998 lst.Dispose(); 2148 lst.Dispose();
1999 Test.Assert(lst.Handle == IntPtr.Zero); 2149 Test.Assert(lst.Handle == IntPtr.Zero);
2150 t.Dispose();
2000 } 2151 }
2001 2152
2002 public static void test_eina_list_int_return() 2153 public static void test_eina_list_int_return()
@@ -2008,6 +2159,7 @@ class TestEinaList
2008 lst.Dispose(); 2159 lst.Dispose();
2009 Test.Assert(lst.Handle == IntPtr.Zero); 2160 Test.Assert(lst.Handle == IntPtr.Zero);
2010 Test.Assert(t.CheckEinaListIntReturn()); 2161 Test.Assert(t.CheckEinaListIntReturn());
2162 t.Dispose();
2011 } 2163 }
2012 2164
2013 public static void test_eina_list_int_return_own() 2165 public static void test_eina_list_int_return_own()
@@ -2019,6 +2171,7 @@ class TestEinaList
2019 lst.AppendArray(append_seq_int); 2171 lst.AppendArray(append_seq_int);
2020 lst.Dispose(); 2172 lst.Dispose();
2021 Test.Assert(lst.Handle == IntPtr.Zero); 2173 Test.Assert(lst.Handle == IntPtr.Zero);
2174 t.Dispose();
2022 } 2175 }
2023 2176
2024 // String // 2177 // String //
@@ -2032,6 +2185,7 @@ class TestEinaList
2032 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str)); 2185 Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
2033 lst.Dispose(); 2186 lst.Dispose();
2034 Test.Assert(lst.Handle == IntPtr.Zero); 2187 Test.Assert(lst.Handle == IntPtr.Zero);
2188 t.Dispose();
2035 } 2189 }
2036 2190
2037 public static void test_eina_list_str_in_own() 2191 public static void test_eina_list_str_in_own()
@@ -2044,6 +2198,7 @@ class TestEinaList
2044 lst.Dispose(); 2198 lst.Dispose();
2045 Test.Assert(lst.Handle == IntPtr.Zero); 2199 Test.Assert(lst.Handle == IntPtr.Zero);
2046 Test.Assert(t.CheckEinaListStrInOwn()); 2200 Test.Assert(t.CheckEinaListStrInOwn());
2201 t.Dispose();
2047 } 2202 }
2048 2203
2049 public static void test_eina_list_str_out() 2204 public static void test_eina_list_str_out()
@@ -2056,6 +2211,7 @@ class TestEinaList
2056 lst.Dispose(); 2211 lst.Dispose();
2057 Test.Assert(lst.Handle == IntPtr.Zero); 2212 Test.Assert(lst.Handle == IntPtr.Zero);
2058 Test.Assert(t.CheckEinaListStrOut()); 2213 Test.Assert(t.CheckEinaListStrOut());
2214 t.Dispose();
2059 } 2215 }
2060 2216
2061 public static void test_eina_list_str_out_own() 2217 public static void test_eina_list_str_out_own()
@@ -2068,6 +2224,7 @@ class TestEinaList
2068 lst.AppendArray(append_seq_str); 2224 lst.AppendArray(append_seq_str);
2069 lst.Dispose(); 2225 lst.Dispose();
2070 Test.Assert(lst.Handle == IntPtr.Zero); 2226 Test.Assert(lst.Handle == IntPtr.Zero);
2227 t.Dispose();
2071 } 2228 }
2072 2229
2073 public static void test_eina_list_str_return() 2230 public static void test_eina_list_str_return()
@@ -2079,6 +2236,7 @@ class TestEinaList
2079 lst.Dispose(); 2236 lst.Dispose();
2080 Test.Assert(lst.Handle == IntPtr.Zero); 2237 Test.Assert(lst.Handle == IntPtr.Zero);
2081 Test.Assert(t.CheckEinaListStrReturn()); 2238 Test.Assert(t.CheckEinaListStrReturn());
2239 t.Dispose();
2082 } 2240 }
2083 2241
2084 public static void test_eina_list_str_return_own() 2242 public static void test_eina_list_str_return_own()
@@ -2090,6 +2248,7 @@ class TestEinaList
2090 lst.AppendArray(append_seq_str); 2248 lst.AppendArray(append_seq_str);
2091 lst.Dispose(); 2249 lst.Dispose();
2092 Test.Assert(lst.Handle == IntPtr.Zero); 2250 Test.Assert(lst.Handle == IntPtr.Zero);
2251 t.Dispose();
2093 } 2252 }
2094 2253
2095 // Eina.Stringshare // 2254 // Eina.Stringshare //
@@ -2103,6 +2262,7 @@ class TestEinaList
2103 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare)); 2262 Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare));
2104 lst.Dispose(); 2263 lst.Dispose();
2105 Test.Assert(lst.Handle == IntPtr.Zero); 2264 Test.Assert(lst.Handle == IntPtr.Zero);
2265 t.Dispose();
2106 } 2266 }
2107 2267
2108 public static void test_eina_list_strshare_in_own() 2268 public static void test_eina_list_strshare_in_own()
@@ -2115,6 +2275,7 @@ class TestEinaList
2115 lst.Dispose(); 2275 lst.Dispose();
2116 Test.Assert(lst.Handle == IntPtr.Zero); 2276 Test.Assert(lst.Handle == IntPtr.Zero);
2117 Test.Assert(t.CheckEinaListStrshareInOwn()); 2277 Test.Assert(t.CheckEinaListStrshareInOwn());
2278 t.Dispose();
2118 } 2279 }
2119 2280
2120 public static void test_eina_list_strshare_out() 2281 public static void test_eina_list_strshare_out()
@@ -2127,6 +2288,7 @@ class TestEinaList
2127 lst.Dispose(); 2288 lst.Dispose();
2128 Test.Assert(lst.Handle == IntPtr.Zero); 2289 Test.Assert(lst.Handle == IntPtr.Zero);
2129 Test.Assert(t.CheckEinaListStrshareOut()); 2290 Test.Assert(t.CheckEinaListStrshareOut());
2291 t.Dispose();
2130 } 2292 }
2131 2293
2132 public static void test_eina_list_strshare_out_own() 2294 public static void test_eina_list_strshare_out_own()
@@ -2139,6 +2301,7 @@ class TestEinaList
2139 lst.AppendArray(append_seq_strshare); 2301 lst.AppendArray(append_seq_strshare);
2140 lst.Dispose(); 2302 lst.Dispose();
2141 Test.Assert(lst.Handle == IntPtr.Zero); 2303 Test.Assert(lst.Handle == IntPtr.Zero);
2304 t.Dispose();
2142 } 2305 }
2143 2306
2144 public static void test_eina_list_strshare_return() 2307 public static void test_eina_list_strshare_return()
@@ -2150,6 +2313,7 @@ class TestEinaList
2150 lst.Dispose(); 2313 lst.Dispose();
2151 Test.Assert(lst.Handle == IntPtr.Zero); 2314 Test.Assert(lst.Handle == IntPtr.Zero);
2152 Test.Assert(t.CheckEinaListStrshareReturn()); 2315 Test.Assert(t.CheckEinaListStrshareReturn());
2316 t.Dispose();
2153 } 2317 }
2154 2318
2155 public static void test_eina_list_strshare_return_own() 2319 public static void test_eina_list_strshare_return_own()
@@ -2161,6 +2325,7 @@ class TestEinaList
2161 lst.AppendArray(append_seq_strshare); 2325 lst.AppendArray(append_seq_strshare);
2162 lst.Dispose(); 2326 lst.Dispose();
2163 Test.Assert(lst.Handle == IntPtr.Zero); 2327 Test.Assert(lst.Handle == IntPtr.Zero);
2328 t.Dispose();
2164 } 2329 }
2165 2330
2166 // Object // 2331 // Object //
@@ -2175,6 +2340,7 @@ class TestEinaList
2175 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj()); 2340 NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
2176 lst.Dispose(); 2341 lst.Dispose();
2177 Test.Assert(lst.Handle == IntPtr.Zero); 2342 Test.Assert(lst.Handle == IntPtr.Zero);
2343 t.Dispose();
2178 } 2344 }
2179 2345
2180 public static void test_eina_list_obj_in_own() 2346 public static void test_eina_list_obj_in_own()
@@ -2187,6 +2353,7 @@ class TestEinaList
2187 lst.Dispose(); 2353 lst.Dispose();
2188 Test.Assert(lst.Handle == IntPtr.Zero); 2354 Test.Assert(lst.Handle == IntPtr.Zero);
2189 Test.Assert(t.CheckEinaListObjInOwn()); 2355 Test.Assert(t.CheckEinaListObjInOwn());
2356 t.Dispose();
2190 } 2357 }
2191 2358
2192 public static void test_eina_list_obj_out() 2359 public static void test_eina_list_obj_out()
@@ -2199,6 +2366,7 @@ class TestEinaList
2199 lst.Dispose(); 2366 lst.Dispose();
2200 Test.Assert(lst.Handle == IntPtr.Zero); 2367 Test.Assert(lst.Handle == IntPtr.Zero);
2201 Test.Assert(t.CheckEinaListObjOut()); 2368 Test.Assert(t.CheckEinaListObjOut());
2369 t.Dispose();
2202 } 2370 }
2203 2371
2204 public static void test_eina_list_obj_out_own() 2372 public static void test_eina_list_obj_out_own()
@@ -2211,6 +2379,7 @@ class TestEinaList
2211 lst.AppendArray(AppendSeqObj()); 2379 lst.AppendArray(AppendSeqObj());
2212 lst.Dispose(); 2380 lst.Dispose();
2213 Test.Assert(lst.Handle == IntPtr.Zero); 2381 Test.Assert(lst.Handle == IntPtr.Zero);
2382 t.Dispose();
2214 } 2383 }
2215 2384
2216 public static void test_eina_list_obj_return() 2385 public static void test_eina_list_obj_return()
@@ -2222,6 +2391,7 @@ class TestEinaList
2222 lst.Dispose(); 2391 lst.Dispose();
2223 Test.Assert(lst.Handle == IntPtr.Zero); 2392 Test.Assert(lst.Handle == IntPtr.Zero);
2224 Test.Assert(t.CheckEinaListObjReturn()); 2393 Test.Assert(t.CheckEinaListObjReturn());
2394 t.Dispose();
2225 } 2395 }
2226 2396
2227 public static void test_eina_list_obj_return_own() 2397 public static void test_eina_list_obj_return_own()
@@ -2233,6 +2403,7 @@ class TestEinaList
2233 lst.AppendArray(AppendSeqObj()); 2403 lst.AppendArray(AppendSeqObj());
2234 lst.Dispose(); 2404 lst.Dispose();
2235 Test.Assert(lst.Handle == IntPtr.Zero); 2405 Test.Assert(lst.Handle == IntPtr.Zero);
2406 t.Dispose();
2236 } 2407 }
2237 2408
2238 public static void test_eina_list_obj_return_in_same_id() 2409 public static void test_eina_list_obj_return_in_same_id()
@@ -2250,6 +2421,8 @@ class TestEinaList
2250 Test.Assert(a[i].NativeHandle == b[i].NativeHandle); 2421 Test.Assert(a[i].NativeHandle == b[i].NativeHandle);
2251 Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle); 2422 Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle);
2252 } 2423 }
2424 a.Dispose();
2425 t.Dispose();
2253 } 2426 }
2254} 2427}
2255 2428
@@ -2265,6 +2438,7 @@ class TestEinaInlist
2265 lst[0] = 22; 2438 lst[0] = 22;
2266 Test.Assert(lst[0] == 22); 2439 Test.Assert(lst[0] == 22);
2267 Test.Assert(lst.Count() == 1); 2440 Test.Assert(lst.Count() == 1);
2441 lst.Dispose();
2268 } 2442 }
2269 2443
2270 public static void data_set_string() 2444 public static void data_set_string()
@@ -2277,6 +2451,7 @@ class TestEinaInlist
2277 lst[0] = "abc"; 2451 lst[0] = "abc";
2278 Test.Assert(lst[0] == "abc"); 2452 Test.Assert(lst[0] == "abc");
2279 Test.Assert(lst.Count() == 1); 2453 Test.Assert(lst.Count() == 1);
2454 lst.Dispose();
2280 } 2455 }
2281 2456
2282 public static void data_set_obj() 2457 public static void data_set_obj()
@@ -2305,6 +2480,10 @@ class TestEinaInlist
2305 Test.Assert(lst[0].GetNumber() == 22); 2480 Test.Assert(lst[0].GetNumber() == 22);
2306 2481
2307 Test.Assert(lst.Count() == 1); 2482 Test.Assert(lst.Count() == 1);
2483 o3.Dispose();
2484 o2.Dispose();
2485 o1.Dispose();
2486 lst.Dispose();
2308 } 2487 }
2309 2488
2310 public static void append_count_int() 2489 public static void append_count_int()
@@ -2320,6 +2499,7 @@ class TestEinaInlist
2320 lst.Append(22); 2499 lst.Append(22);
2321 Test.Assert(lst[2] == 22); 2500 Test.Assert(lst[2] == 22);
2322 Test.Assert(lst.Count() == 3); 2501 Test.Assert(lst.Count() == 3);
2502 lst.Dispose();
2323 } 2503 }
2324 2504
2325 public static void append_count_string() 2505 public static void append_count_string()
@@ -2335,6 +2515,7 @@ class TestEinaInlist
2335 lst.Append("c"); 2515 lst.Append("c");
2336 Test.Assert(lst[2] == "c"); 2516 Test.Assert(lst[2] == "c");
2337 Test.Assert(lst.Count() == 3); 2517 Test.Assert(lst.Count() == 3);
2518 lst.Dispose();
2338 } 2519 }
2339 2520
2340 public static void append_count_obj() 2521 public static void append_count_obj()
@@ -2363,6 +2544,10 @@ class TestEinaInlist
2363 Test.Assert(lst[2].NativeHandle == o3.NativeHandle); 2544 Test.Assert(lst[2].NativeHandle == o3.NativeHandle);
2364 Test.Assert(lst[2].GetNumber() == 22); 2545 Test.Assert(lst[2].GetNumber() == 22);
2365 Test.Assert(lst.Count() == 3); 2546 Test.Assert(lst.Count() == 3);
2547 o3.Dispose();
2548 o2.Dispose();
2549 o1.Dispose();
2550 lst.Dispose();
2366 } 2551 }
2367 2552
2368 public static void length_int() 2553 public static void length_int()
@@ -2378,6 +2563,7 @@ class TestEinaInlist
2378 lst.Append(22); 2563 lst.Append(22);
2379 Test.Assert(lst[2] == 22); 2564 Test.Assert(lst[2] == 22);
2380 Test.Assert(lst.Length == 3); 2565 Test.Assert(lst.Length == 3);
2566 lst.Dispose();
2381 } 2567 }
2382 2568
2383 public static void length_string() 2569 public static void length_string()
@@ -2393,6 +2579,7 @@ class TestEinaInlist
2393 lst.Append("c"); 2579 lst.Append("c");
2394 Test.Assert(lst[2] == "c"); 2580 Test.Assert(lst[2] == "c");
2395 Test.Assert(lst.Length == 3); 2581 Test.Assert(lst.Length == 3);
2582 lst.Dispose();
2396 } 2583 }
2397 2584
2398 public static void prepend_count_int() 2585 public static void prepend_count_int()
@@ -2408,6 +2595,7 @@ class TestEinaInlist
2408 lst.Prepend(22); 2595 lst.Prepend(22);
2409 Test.Assert(lst[0] == 22); 2596 Test.Assert(lst[0] == 22);
2410 Test.Assert(lst.Count() == 3); 2597 Test.Assert(lst.Count() == 3);
2598 lst.Dispose();
2411 } 2599 }
2412 2600
2413 public static void prepend_count_string() 2601 public static void prepend_count_string()
@@ -2423,6 +2611,7 @@ class TestEinaInlist
2423 lst.Prepend("c"); 2611 lst.Prepend("c");
2424 Test.Assert(lst[0] == "c"); 2612 Test.Assert(lst[0] == "c");
2425 Test.Assert(lst.Count() == 3); 2613 Test.Assert(lst.Count() == 3);
2614 lst.Dispose();
2426 } 2615 }
2427 2616
2428 public static void prepend_count_obj() 2617 public static void prepend_count_obj()
@@ -2451,6 +2640,10 @@ class TestEinaInlist
2451 Test.Assert(lst[0].NativeHandle == o3.NativeHandle); 2640 Test.Assert(lst[0].NativeHandle == o3.NativeHandle);
2452 Test.Assert(lst[0].GetNumber() == 22); 2641 Test.Assert(lst[0].GetNumber() == 22);
2453 Test.Assert(lst.Count() == 3); 2642 Test.Assert(lst.Count() == 3);
2643 o3.Dispose();
2644 o2.Dispose();
2645 o1.Dispose();
2646 lst.Dispose();
2454 } 2647 }
2455 2648
2456 public static void eina_inlist_as_ienumerable_int() 2649 public static void eina_inlist_as_ienumerable_int()
@@ -2466,6 +2659,7 @@ class TestEinaInlist
2466 Test.AssertEquals(cmp, e); 2659 Test.AssertEquals(cmp, e);
2467 cmp /= 2; 2660 cmp /= 2;
2468 } 2661 }
2662 lst.Dispose();
2469 } 2663 }
2470 2664
2471 public static void eina_inlist_as_ienumerable_string() 2665 public static void eina_inlist_as_ienumerable_string()
@@ -2481,6 +2675,7 @@ class TestEinaInlist
2481 Test.AssertEquals(cmp, e); 2675 Test.AssertEquals(cmp, e);
2482 cmp = cmp + "X"; 2676 cmp = cmp + "X";
2483 } 2677 }
2678 lst.Dispose();
2484 } 2679 }
2485 2680
2486 public static void eina_inlist_as_ienumerable_obj() 2681 public static void eina_inlist_as_ienumerable_obj()
@@ -2505,6 +2700,7 @@ class TestEinaInlist
2505 Test.Assert(cmp[i].NativeHandle == e.NativeHandle); 2700 Test.Assert(cmp[i].NativeHandle == e.NativeHandle);
2506 ++i; 2701 ++i;
2507 } 2702 }
2703 lst.Dispose();
2508 } 2704 }
2509 2705
2510} // < TestEinaInlist 2706} // < TestEinaInlist
@@ -2601,6 +2797,9 @@ class TestEinaHash
2601 2797
2602 Test.Assert(hsh.Count == 3); 2798 Test.Assert(hsh.Count == 3);
2603 2799
2800 c.Dispose();
2801 b.Dispose();
2802 a.Dispose();
2604 hsh.Dispose(); 2803 hsh.Dispose();
2605 } 2804 }
2606 2805
@@ -2721,6 +2920,9 @@ class TestEinaHash
2721 Test.AssertEquals(count, 3); 2920 Test.AssertEquals(count, 3);
2722 Test.AssertEquals(dct.Count, 0); 2921 Test.AssertEquals(dct.Count, 0);
2723 2922
2923 a.Dispose();
2924 b.Dispose();
2925 c.Dispose();
2724 hsh.Dispose(); 2926 hsh.Dispose();
2725 } 2927 }
2726 2928
@@ -2741,6 +2943,7 @@ class TestEinaHash
2741 Test.Assert(hsh[44] == 444); 2943 Test.Assert(hsh[44] == 444);
2742 hsh.Dispose(); 2944 hsh.Dispose();
2743 Test.Assert(hsh.Handle == IntPtr.Zero); 2945 Test.Assert(hsh.Handle == IntPtr.Zero);
2946 t.Dispose();
2744 } 2947 }
2745 2948
2746 /* 2949 /*
@@ -2757,6 +2960,7 @@ class TestEinaHash
2757 hsh.Dispose(); 2960 hsh.Dispose();
2758 Test.Assert(hsh.Handle == IntPtr.Zero); 2961 Test.Assert(hsh.Handle == IntPtr.Zero);
2759 Test.Assert(t.CheckEinaHashIntInOwn()); 2962 Test.Assert(t.CheckEinaHashIntInOwn());
2963 t.Dispose();
2760 } 2964 }
2761 */ 2965 */
2762 2966
@@ -2772,6 +2976,7 @@ class TestEinaHash
2772 hsh.Dispose(); 2976 hsh.Dispose();
2773 Test.Assert(hsh.Handle == IntPtr.Zero); 2977 Test.Assert(hsh.Handle == IntPtr.Zero);
2774 Test.Assert(t.CheckEinaHashIntOut()); 2978 Test.Assert(t.CheckEinaHashIntOut());
2979 t.Dispose();
2775 } 2980 }
2776 2981
2777 /* 2982 /*
@@ -2787,6 +2992,7 @@ class TestEinaHash
2787 hsh.Dispose(); 2992 hsh.Dispose();
2788 Test.Assert(hsh.Handle == IntPtr.Zero); 2993 Test.Assert(hsh.Handle == IntPtr.Zero);
2789 Test.Assert(t.CheckEinaHashIntOutOwn()); 2994 Test.Assert(t.CheckEinaHashIntOutOwn());
2995 t.Dispose();
2790 } 2996 }
2791 */ 2997 */
2792 2998
@@ -2801,6 +3007,7 @@ class TestEinaHash
2801 hsh.Dispose(); 3007 hsh.Dispose();
2802 Test.Assert(hsh.Handle == IntPtr.Zero); 3008 Test.Assert(hsh.Handle == IntPtr.Zero);
2803 Test.Assert(t.CheckEinaHashIntReturn()); 3009 Test.Assert(t.CheckEinaHashIntReturn());
3010 t.Dispose();
2804 } 3011 }
2805 3012
2806 /* 3013 /*
@@ -2815,6 +3022,7 @@ class TestEinaHash
2815 hsh.Dispose(); 3022 hsh.Dispose();
2816 Test.Assert(hsh.Handle == IntPtr.Zero); 3023 Test.Assert(hsh.Handle == IntPtr.Zero);
2817 Test.Assert(t.CheckEinaHashIntReturnOwn()); 3024 Test.Assert(t.CheckEinaHashIntReturnOwn());
3025 t.Dispose();
2818 } 3026 }
2819 */ 3027 */
2820 3028
@@ -2831,6 +3039,7 @@ class TestEinaHash
2831 Test.Assert(hsh["bb"] == "bbb"); 3039 Test.Assert(hsh["bb"] == "bbb");
2832 hsh.Dispose(); 3040 hsh.Dispose();
2833 Test.Assert(hsh.Handle == IntPtr.Zero); 3041 Test.Assert(hsh.Handle == IntPtr.Zero);
3042 t.Dispose();
2834 } 3043 }
2835 3044
2836 public static void test_eina_hash_str_in_own() 3045 public static void test_eina_hash_str_in_own()
@@ -2846,6 +3055,7 @@ class TestEinaHash
2846 hsh.Dispose(); 3055 hsh.Dispose();
2847 Test.Assert(hsh.Handle == IntPtr.Zero); 3056 Test.Assert(hsh.Handle == IntPtr.Zero);
2848 Test.Assert(t.CheckEinaHashStrInOwn()); 3057 Test.Assert(t.CheckEinaHashStrInOwn());
3058 t.Dispose();
2849 } 3059 }
2850 3060
2851 public static void test_eina_hash_str_out() 3061 public static void test_eina_hash_str_out()
@@ -2860,6 +3070,7 @@ class TestEinaHash
2860 hsh.Dispose(); 3070 hsh.Dispose();
2861 Test.Assert(hsh.Handle == IntPtr.Zero); 3071 Test.Assert(hsh.Handle == IntPtr.Zero);
2862 Test.Assert(t.CheckEinaHashStrOut()); 3072 Test.Assert(t.CheckEinaHashStrOut());
3073 t.Dispose();
2863 } 3074 }
2864 3075
2865 public static void test_eina_hash_str_out_own() 3076 public static void test_eina_hash_str_out_own()
@@ -2874,6 +3085,7 @@ class TestEinaHash
2874 hsh.Dispose(); 3085 hsh.Dispose();
2875 Test.Assert(hsh.Handle == IntPtr.Zero); 3086 Test.Assert(hsh.Handle == IntPtr.Zero);
2876 Test.Assert(t.CheckEinaHashStrOutOwn()); 3087 Test.Assert(t.CheckEinaHashStrOutOwn());
3088 t.Dispose();
2877 } 3089 }
2878 3090
2879 public static void test_eina_hash_str_return() 3091 public static void test_eina_hash_str_return()
@@ -2887,6 +3099,7 @@ class TestEinaHash
2887 hsh.Dispose(); 3099 hsh.Dispose();
2888 Test.Assert(hsh.Handle == IntPtr.Zero); 3100 Test.Assert(hsh.Handle == IntPtr.Zero);
2889 Test.Assert(t.CheckEinaHashStrReturn()); 3101 Test.Assert(t.CheckEinaHashStrReturn());
3102 t.Dispose();
2890 } 3103 }
2891 3104
2892 public static void test_eina_hash_str_return_own() 3105 public static void test_eina_hash_str_return_own()
@@ -2900,6 +3113,7 @@ class TestEinaHash
2900 hsh.Dispose(); 3113 hsh.Dispose();
2901 Test.Assert(hsh.Handle == IntPtr.Zero); 3114 Test.Assert(hsh.Handle == IntPtr.Zero);
2902 Test.Assert(t.CheckEinaHashStrReturnOwn()); 3115 Test.Assert(t.CheckEinaHashStrReturnOwn());
3116 t.Dispose();
2903 } 3117 }
2904 3118
2905 // Eina.Stringshare // 3119 // Eina.Stringshare //
@@ -3005,8 +3219,13 @@ class TestEinaHash
3005 Test.Assert(hsh[nwk2].NativeHandle == nwv2.NativeHandle); 3219 Test.Assert(hsh[nwk2].NativeHandle == nwv2.NativeHandle);
3006 Test.Assert(hsh[nwk2].GetNumber() == nwv2.GetNumber()); 3220 Test.Assert(hsh[nwk2].GetNumber() == nwv2.GetNumber());
3007 Test.Assert(hsh[nwk2].GetNumber() == 444); 3221 Test.Assert(hsh[nwk2].GetNumber() == 444);
3222 nwk1.Dispose();
3223 nwk2.Dispose();
3224 nwv1.Dispose();
3225 nwv2.Dispose();
3008 hsh.Dispose(); 3226 hsh.Dispose();
3009 Test.Assert(hsh.Handle == IntPtr.Zero); 3227 Test.Assert(hsh.Handle == IntPtr.Zero);
3228 t.Dispose();
3010 } 3229 }
3011 3230
3012 public static void test_eina_hash_obj_in_own() 3231 public static void test_eina_hash_obj_in_own()
@@ -3029,6 +3248,11 @@ class TestEinaHash
3029 hsh.Dispose(); 3248 hsh.Dispose();
3030 Test.Assert(hsh.Handle == IntPtr.Zero); 3249 Test.Assert(hsh.Handle == IntPtr.Zero);
3031 Test.Assert(t.CheckEinaHashObjInOwn(nwk1, nwv1, nwk2, nwv2)); 3250 Test.Assert(t.CheckEinaHashObjInOwn(nwk1, nwv1, nwk2, nwv2));
3251 nwk1.Dispose();
3252 nwk2.Dispose();
3253 nwv1.Dispose();
3254 nwv2.Dispose();
3255 t.Dispose();
3032 } 3256 }
3033 3257
3034 public static void test_eina_hash_obj_out() 3258 public static void test_eina_hash_obj_out()
@@ -3048,6 +3272,11 @@ class TestEinaHash
3048 hsh.Dispose(); 3272 hsh.Dispose();
3049 Test.Assert(hsh.Handle == IntPtr.Zero); 3273 Test.Assert(hsh.Handle == IntPtr.Zero);
3050 Test.Assert(t.CheckEinaHashObjOut(nwk1, nwv1, nwk2, nwv2)); 3274 Test.Assert(t.CheckEinaHashObjOut(nwk1, nwv1, nwk2, nwv2));
3275 nwk1.Dispose();
3276 nwk2.Dispose();
3277 nwv1.Dispose();
3278 nwv2.Dispose();
3279 t.Dispose();
3051 } 3280 }
3052 3281
3053 public static void test_eina_hash_obj_out_own() 3282 public static void test_eina_hash_obj_out_own()
@@ -3064,9 +3293,14 @@ class TestEinaHash
3064 Dummy.Numberwrapper nwk2 = NW(44); 3293 Dummy.Numberwrapper nwk2 = NW(44);
3065 Dummy.Numberwrapper nwv2 = NW(444); 3294 Dummy.Numberwrapper nwv2 = NW(444);
3066 hsh[nwk2] = nwv2; 3295 hsh[nwk2] = nwv2;
3296 nwk1.Dispose();
3297 nwk2.Dispose();
3298 nwv1.Dispose();
3299 nwv2.Dispose();
3067 hsh.Dispose(); 3300 hsh.Dispose();
3068 Test.Assert(hsh.Handle == IntPtr.Zero); 3301 Test.Assert(hsh.Handle == IntPtr.Zero);
3069 Test.Assert(t.CheckEinaHashObjOutOwn()); 3302 Test.Assert(t.CheckEinaHashObjOutOwn());
3303 t.Dispose();
3070 } 3304 }
3071 3305
3072 public static void test_eina_hash_obj_return() 3306 public static void test_eina_hash_obj_return()
@@ -3085,6 +3319,11 @@ class TestEinaHash
3085 hsh.Dispose(); 3319 hsh.Dispose();
3086 Test.Assert(hsh.Handle == IntPtr.Zero); 3320 Test.Assert(hsh.Handle == IntPtr.Zero);
3087 Test.Assert(t.CheckEinaHashObjReturn(nwk1, nwv1, nwk2, nwv2)); 3321 Test.Assert(t.CheckEinaHashObjReturn(nwk1, nwv1, nwk2, nwv2));
3322 nwk1.Dispose();
3323 nwk2.Dispose();
3324 nwv1.Dispose();
3325 nwv2.Dispose();
3326 t.Dispose();
3088 } 3327 }
3089 3328
3090 public static void test_eina_hash_obj_return_own() 3329 public static void test_eina_hash_obj_return_own()
@@ -3100,9 +3339,14 @@ class TestEinaHash
3100 Dummy.Numberwrapper nwk2 = NW(44); 3339 Dummy.Numberwrapper nwk2 = NW(44);
3101 Dummy.Numberwrapper nwv2 = NW(444); 3340 Dummy.Numberwrapper nwv2 = NW(444);
3102 hsh[nwk2] = nwv2; 3341 hsh[nwk2] = nwv2;
3342 nwk1.Dispose();
3343 nwk2.Dispose();
3344 nwv1.Dispose();
3345 nwv2.Dispose();
3103 hsh.Dispose(); 3346 hsh.Dispose();
3104 Test.Assert(hsh.Handle == IntPtr.Zero); 3347 Test.Assert(hsh.Handle == IntPtr.Zero);
3105 Test.Assert(t.CheckEinaHashObjReturnOwn()); 3348 Test.Assert(t.CheckEinaHashObjReturnOwn());
3349 t.Dispose();
3106 } 3350 }
3107} 3351}
3108 3352
@@ -3771,6 +4015,7 @@ class TestEinaIterator
3771 Test.AssertEquals(idx, 3); 4015 Test.AssertEquals(idx, 3);
3772 4016
3773 itr.Dispose(); 4017 itr.Dispose();
4018 dct.Dispose();
3774 hsh.Dispose(); 4019 hsh.Dispose();
3775 } 4020 }
3776 4021
@@ -3806,6 +4051,10 @@ class TestEinaIterator
3806 Test.AssertEquals(idx, 3); 4051 Test.AssertEquals(idx, 3);
3807 4052
3808 itr.Dispose(); 4053 itr.Dispose();
4054 a.Dispose();
4055 b.Dispose();
4056 c.Dispose();
4057 dct.Dispose();
3809 hsh.Dispose(); 4058 hsh.Dispose();
3810 } 4059 }
3811 4060
@@ -3834,6 +4083,7 @@ class TestEinaIterator
3834 4083
3835 itr.Dispose(); 4084 itr.Dispose();
3836 arr.Dispose(); 4085 arr.Dispose();
4086 t.Dispose();
3837 } 4087 }
3838 4088
3839 public static void test_eina_iterator_int_in_own() 4089 public static void test_eina_iterator_int_in_own()
@@ -3859,6 +4109,7 @@ class TestEinaIterator
3859 arr.Dispose(); 4109 arr.Dispose();
3860 4110
3861 Test.Assert(t.CheckEinaIteratorIntInOwn()); 4111 Test.Assert(t.CheckEinaIteratorIntInOwn());
4112 t.Dispose();
3862 } 4113 }
3863 4114
3864 public static void test_eina_iterator_int_out() 4115 public static void test_eina_iterator_int_out()
@@ -3881,6 +4132,7 @@ class TestEinaIterator
3881 itr.Dispose(); 4132 itr.Dispose();
3882 4133
3883 Test.Assert(t.CheckEinaIteratorIntOut()); 4134 Test.Assert(t.CheckEinaIteratorIntOut());
4135 t.Dispose();
3884 } 4136 }
3885 4137
3886 public static void test_eina_iterator_int_out_own() 4138 public static void test_eina_iterator_int_out_own()
@@ -3901,6 +4153,7 @@ class TestEinaIterator
3901 Test.AssertEquals(idx, base_seq_int.Length); 4153 Test.AssertEquals(idx, base_seq_int.Length);
3902 4154
3903 itr.Dispose(); 4155 itr.Dispose();
4156 t.Dispose();
3904 } 4157 }
3905 4158
3906 public static void test_eina_iterator_int_return() 4159 public static void test_eina_iterator_int_return()
@@ -3922,6 +4175,7 @@ class TestEinaIterator
3922 itr.Dispose(); 4175 itr.Dispose();
3923 4176
3924 Test.Assert(t.CheckEinaIteratorIntReturn()); 4177 Test.Assert(t.CheckEinaIteratorIntReturn());
4178 t.Dispose();
3925 } 4179 }
3926 4180
3927 public static void test_eina_iterator_int_return_own() 4181 public static void test_eina_iterator_int_return_own()
@@ -3941,6 +4195,7 @@ class TestEinaIterator
3941 Test.AssertEquals(idx, base_seq_int.Length); 4195 Test.AssertEquals(idx, base_seq_int.Length);
3942 4196
3943 itr.Dispose(); 4197 itr.Dispose();
4198 t.Dispose();
3944 } 4199 }
3945 4200
3946 // String // 4201 // String //
@@ -3964,6 +4219,7 @@ class TestEinaIterator
3964 4219
3965 itr.Dispose(); 4220 itr.Dispose();
3966 arr.Dispose(); 4221 arr.Dispose();
4222 t.Dispose();
3967 } 4223 }
3968 4224
3969 public static void test_eina_iterator_str_in_own() 4225 public static void test_eina_iterator_str_in_own()
@@ -3987,6 +4243,7 @@ class TestEinaIterator
3987 arr.Dispose(); 4243 arr.Dispose();
3988 4244
3989 Test.Assert(t.CheckEinaIteratorStrInOwn()); 4245 Test.Assert(t.CheckEinaIteratorStrInOwn());
4246 t.Dispose();
3990 } 4247 }
3991 4248
3992 public static void test_eina_iterator_str_out() 4249 public static void test_eina_iterator_str_out()
@@ -4009,6 +4266,7 @@ class TestEinaIterator
4009 itr.Dispose(); 4266 itr.Dispose();
4010 4267
4011 Test.Assert(t.CheckEinaIteratorStrOut()); 4268 Test.Assert(t.CheckEinaIteratorStrOut());
4269 t.Dispose();
4012 } 4270 }
4013 4271
4014 public static void test_eina_iterator_str_out_own() 4272 public static void test_eina_iterator_str_out_own()
@@ -4029,6 +4287,7 @@ class TestEinaIterator
4029 Test.AssertEquals(idx, base_seq_str.Length); 4287 Test.AssertEquals(idx, base_seq_str.Length);
4030 4288
4031 itr.Dispose(); 4289 itr.Dispose();
4290 t.Dispose();
4032 } 4291 }
4033 4292
4034 public static void test_eina_iterator_str_return() 4293 public static void test_eina_iterator_str_return()
@@ -4050,6 +4309,7 @@ class TestEinaIterator
4050 itr.Dispose(); 4309 itr.Dispose();
4051 4310
4052 Test.Assert(t.CheckEinaIteratorStrReturn()); 4311 Test.Assert(t.CheckEinaIteratorStrReturn());
4312 t.Dispose();
4053 } 4313 }
4054 4314
4055 public static void test_eina_iterator_str_return_own() 4315 public static void test_eina_iterator_str_return_own()
@@ -4069,6 +4329,7 @@ class TestEinaIterator
4069 Test.AssertEquals(idx, base_seq_str.Length); 4329 Test.AssertEquals(idx, base_seq_str.Length);
4070 4330
4071 itr.Dispose(); 4331 itr.Dispose();
4332 t.Dispose();
4072 } 4333 }
4073 4334
4074 // Eina.Stringshare // 4335 // Eina.Stringshare //
@@ -4092,6 +4353,7 @@ class TestEinaIterator
4092 4353
4093 itr.Dispose(); 4354 itr.Dispose();
4094 arr.Dispose(); 4355 arr.Dispose();
4356 t.Dispose();
4095 } 4357 }
4096 4358
4097 public static void test_eina_iterator_strshare_in_own() 4359 public static void test_eina_iterator_strshare_in_own()
@@ -4115,6 +4377,7 @@ class TestEinaIterator
4115 arr.Dispose(); 4377 arr.Dispose();
4116 4378
4117 Test.Assert(t.CheckEinaIteratorStrshareInOwn()); 4379 Test.Assert(t.CheckEinaIteratorStrshareInOwn());
4380 t.Dispose();
4118 } 4381 }
4119 4382
4120 public static void test_eina_iterator_strshare_out() 4383 public static void test_eina_iterator_strshare_out()
@@ -4137,6 +4400,7 @@ class TestEinaIterator
4137 itr.Dispose(); 4400 itr.Dispose();
4138 4401
4139 Test.Assert(t.CheckEinaIteratorStrshareOut()); 4402 Test.Assert(t.CheckEinaIteratorStrshareOut());
4403 t.Dispose();
4140 } 4404 }
4141 4405
4142 public static void test_eina_iterator_strshare_out_own() 4406 public static void test_eina_iterator_strshare_out_own()
@@ -4157,6 +4421,7 @@ class TestEinaIterator
4157 Test.AssertEquals(idx, base_seq_strshare.Length); 4421 Test.AssertEquals(idx, base_seq_strshare.Length);
4158 4422
4159 itr.Dispose(); 4423 itr.Dispose();
4424 t.Dispose();
4160 } 4425 }
4161 4426
4162 public static void test_eina_iterator_strshare_return() 4427 public static void test_eina_iterator_strshare_return()
@@ -4178,6 +4443,7 @@ class TestEinaIterator
4178 itr.Dispose(); 4443 itr.Dispose();
4179 4444
4180 Test.Assert(t.CheckEinaIteratorStrshareReturn()); 4445 Test.Assert(t.CheckEinaIteratorStrshareReturn());
4446 t.Dispose();
4181 } 4447 }
4182 4448
4183 public static void test_eina_iterator_strshare_return_own() 4449 public static void test_eina_iterator_strshare_return_own()
@@ -4197,6 +4463,7 @@ class TestEinaIterator
4197 Test.AssertEquals(idx, base_seq_strshare.Length); 4463 Test.AssertEquals(idx, base_seq_strshare.Length);
4198 4464
4199 itr.Dispose(); 4465 itr.Dispose();
4466 t.Dispose();
4200 } 4467 }
4201 4468
4202 // Object // 4469 // Object //
@@ -4220,6 +4487,7 @@ class TestEinaIterator
4220 4487
4221 itr.Dispose(); 4488 itr.Dispose();
4222 arr.Dispose(); 4489 arr.Dispose();
4490 t.Dispose();
4223 } 4491 }
4224 4492
4225 public static void test_eina_iterator_obj_in_own() 4493 public static void test_eina_iterator_obj_in_own()
@@ -4243,6 +4511,7 @@ class TestEinaIterator
4243 arr.Dispose(); 4511 arr.Dispose();
4244 4512
4245 Test.Assert(t.CheckEinaIteratorObjInOwn()); 4513 Test.Assert(t.CheckEinaIteratorObjInOwn());
4514 t.Dispose();
4246 } 4515 }
4247 4516
4248 public static void test_eina_iterator_obj_out() 4517 public static void test_eina_iterator_obj_out()
@@ -4267,6 +4536,7 @@ class TestEinaIterator
4267 itr.Dispose(); 4536 itr.Dispose();
4268 4537
4269 Test.Assert(t.CheckEinaIteratorObjOut()); 4538 Test.Assert(t.CheckEinaIteratorObjOut());
4539 t.Dispose();
4270 } 4540 }
4271 4541
4272 public static void test_eina_iterator_obj_out_own() 4542 public static void test_eina_iterator_obj_out_own()
@@ -4289,6 +4559,7 @@ class TestEinaIterator
4289 Test.AssertEquals(idx, base_seq_obj.Length); 4559 Test.AssertEquals(idx, base_seq_obj.Length);
4290 4560
4291 itr.Dispose(); 4561 itr.Dispose();
4562 t.Dispose();
4292 } 4563 }
4293 4564
4294 public static void test_eina_iterator_obj_return() 4565 public static void test_eina_iterator_obj_return()
@@ -4312,6 +4583,7 @@ class TestEinaIterator
4312 itr.Dispose(); 4583 itr.Dispose();
4313 4584
4314 Test.Assert(t.CheckEinaIteratorObjReturn()); 4585 Test.Assert(t.CheckEinaIteratorObjReturn());
4586 t.Dispose();
4315 } 4587 }
4316 4588
4317 public static void test_eina_iterator_obj_return_own() 4589 public static void test_eina_iterator_obj_return_own()
@@ -4333,6 +4605,7 @@ class TestEinaIterator
4333 Test.AssertEquals(idx, base_seq_obj.Length); 4605 Test.AssertEquals(idx, base_seq_obj.Length);
4334 4606
4335 itr.Dispose(); 4607 itr.Dispose();
4608 t.Dispose();
4336 } 4609 }
4337} // < TestEinaIterator 4610} // < TestEinaIterator
4338 4611
@@ -4355,6 +4628,8 @@ class TestEinaAccessor
4355 { 4628 {
4356 Test.AssertEquals(pair.Item1, pair.Item2); 4629 Test.AssertEquals(pair.Item1, pair.Item2);
4357 } 4630 }
4631
4632 lst.Dispose();
4358 } 4633 }
4359 4634
4360 public static void basic_accessor_array() 4635 public static void basic_accessor_array()
@@ -4370,6 +4645,8 @@ class TestEinaAccessor
4370 { 4645 {
4371 Test.AssertEquals(pair.Item1, pair.Item2); 4646 Test.AssertEquals(pair.Item1, pair.Item2);
4372 } 4647 }
4648
4649 arr.Dispose();
4373 } 4650 }
4374 4651
4375 public static void basic_accessor_inlist() 4652 public static void basic_accessor_inlist()
@@ -4388,6 +4665,7 @@ class TestEinaAccessor
4388 { 4665 {
4389 Test.AssertEquals(pair.Item1, pair.Item2); 4666 Test.AssertEquals(pair.Item1, pair.Item2);
4390 } 4667 }
4668 lst.Dispose();
4391 } 4669 }
4392 4670
4393 public static void basic_accessor_inarray() 4671 public static void basic_accessor_inarray()
@@ -4403,6 +4681,7 @@ class TestEinaAccessor
4403 { 4681 {
4404 Test.AssertEquals(pair.Item1, pair.Item2); 4682 Test.AssertEquals(pair.Item1, pair.Item2);
4405 } 4683 }
4684 arr.Dispose();
4406 } 4685 }
4407} 4686}
4408 4687
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index e9ddb66..dec54ba 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -28,6 +28,7 @@ class TestEo
28 var testing = new Dummy.TestObject(); 28 var testing = new Dummy.TestObject();
29 var o1 = testing.ReturnNullObject(); 29 var o1 = testing.ReturnNullObject();
30 Test.Assert(o1 == null); 30 Test.Assert(o1 == null);
31 testing.Dispose();
31 } 32 }
32 33
33 // 34 //
@@ -42,6 +43,7 @@ class TestEo
42 var o2 = o1.ReturnObject(); 43 var o2 = o1.ReturnObject();
43 Test.Assert(o2.NativeHandle != IntPtr.Zero); 44 Test.Assert(o2.NativeHandle != IntPtr.Zero);
44 Test.Assert(o2.NativeHandle == o1.NativeHandle); 45 Test.Assert(o2.NativeHandle == o1.NativeHandle);
46 testing.Dispose();
45 } 47 }
46 /* Commented out as adding the event listener seems to prevent it from being GC'd. 48 /* Commented out as adding the event listener seems to prevent it from being GC'd.
47 public static void destructor_really_frees() 49 public static void destructor_really_frees()
@@ -121,12 +123,12 @@ class TestEoInherit
121 { 123 {
122 Efl.Object loop = new MyObject(); 124 Efl.Object loop = new MyObject();
123 Test.Assert(loop.NativeHandle != System.IntPtr.Zero); 125 Test.Assert(loop.NativeHandle != System.IntPtr.Zero);
126 loop.Dispose();
124 } 127 }
125 128
126 private static WeakReference CreateCollectableInherited() 129 private static WeakReference CreateCollectableInherited()
127 { 130 {
128 var obj = new MyObject(); 131 return new WeakReference(new MyObject());
129 return new WeakReference(obj);
130 } 132 }
131 133
132 public static void inherited_collected() 134 public static void inherited_collected()
@@ -147,6 +149,7 @@ class TestEoNames
147 string name = "Dummy"; 149 string name = "Dummy";
148 obj.SetName(name); 150 obj.SetName(name);
149 Test.AssertEquals(name, obj.GetName()); 151 Test.AssertEquals(name, obj.GetName());
152 obj.Dispose();
150 } 153 }
151} 154}
152 155
@@ -161,6 +164,8 @@ class TestEoParent
161 164
162 var parent_retrieved = child.GetParent() as Dummy.TestObject; 165 var parent_retrieved = child.GetParent() as Dummy.TestObject;
163 Test.AssertEquals(parent, parent_retrieved); 166 Test.AssertEquals(parent, parent_retrieved);
167 child.Dispose();
168 parent.Dispose();
164 } 169 }
165 170
166 public static void parent_inherited_class() 171 public static void parent_inherited_class()
@@ -172,6 +177,8 @@ class TestEoParent
172 177
173 Dummy.Numberwrapper parent_retrieved = child.GetParent() as Dummy.Numberwrapper; 178 Dummy.Numberwrapper parent_retrieved = child.GetParent() as Dummy.Numberwrapper;
174 Test.AssertEquals(parent, parent_retrieved); 179 Test.AssertEquals(parent, parent_retrieved);
180 child.Dispose();
181 parent.Dispose();
175 } 182 }
176 183
177 private class Derived : Dummy.TestObject 184 private class Derived : Dummy.TestObject
@@ -190,6 +197,8 @@ class TestEoParent
190 197
191 var parent_from_cast = child.GetParent() as Derived; 198 var parent_from_cast = child.GetParent() as Derived;
192 Test.AssertEquals(parent, parent_from_cast); 199 Test.AssertEquals(parent, parent_from_cast);
200 child.Dispose();
201 parent.Dispose();
193 } 202 }
194} 203}
195 204
@@ -222,7 +231,7 @@ class TestTypedefs
222 231
223 Test.AssertEquals((Dummy.MyInt)ret, input); 232 Test.AssertEquals((Dummy.MyInt)ret, input);
224 Test.AssertEquals(receiver, input); 233 Test.AssertEquals(receiver, input);
225 234 obj.Dispose();
226 } 235 }
227} 236}
228 237
@@ -262,6 +271,8 @@ class TestEoAccessors
262 { 271 {
263 Test.AssertEquals(pair.Item1, pair.Item2); 272 Test.AssertEquals(pair.Item1, pair.Item2);
264 } 273 }
274 lst.Dispose();
275 obj.Dispose();
265 } 276 }
266} 277}
267 278
@@ -282,6 +293,7 @@ class TestEoFinalize
282 { 293 {
283 Inherit inherit = new Inherit(); 294 Inherit inherit = new Inherit();
284 Test.Assert(inherit.finalizeCalled); 295 Test.Assert(inherit.finalizeCalled);
296 inherit.Dispose();
285 } 297 }
286} 298}
287 299
@@ -315,8 +327,11 @@ class TestEoMultipleChildClasses
315 SecondChild obj2 = new SecondChild(); 327 SecondChild obj2 = new SecondChild();
316 Test.AssertEquals(2, obj2.receivedValue); 328 Test.AssertEquals(2, obj2.receivedValue);
317 329
330 obj.Dispose();
318 obj = new FirstChild(); 331 obj = new FirstChild();
319 Test.AssertEquals(1, obj.receivedValue); 332 Test.AssertEquals(1, obj.receivedValue);
333 obj2.Dispose();
334 obj.Dispose();
320 } 335 }
321} 336}
322 337
@@ -329,12 +344,14 @@ class TestCsharpProperties
329 obj.Name = name; 344 obj.Name = name;
330 345
331 Test.AssertEquals(name, obj.Name); 346 Test.AssertEquals(name, obj.Name);
347 obj.Dispose();
332 } 348 }
333 349
334 public static void test_getter_only() 350 public static void test_getter_only()
335 { 351 {
336 var obj = new Dummy.TestObject(); 352 var obj = new Dummy.TestObject();
337 Test.Assert(!obj.Invalidating); 353 Test.Assert(!obj.Invalidating);
354 obj.Dispose();
338 } 355 }
339 356
340 public static void test_setter_only() 357 public static void test_setter_only()
@@ -344,6 +361,7 @@ class TestCsharpProperties
344 361
345 obj.SetterOnly = val; 362 obj.SetterOnly = val;
346 Test.AssertEquals(val, obj.GetSetterOnly()); 363 Test.AssertEquals(val, obj.GetSetterOnly());
364 obj.Dispose();
347 } 365 }
348 366
349 public static void test_class_property() 367 public static void test_class_property()
@@ -359,6 +377,7 @@ class TestCsharpProperties
359 Dummy.ITestIface iface = new Dummy.TestObject(); 377 Dummy.ITestIface iface = new Dummy.TestObject();
360 iface.IfaceProp = val; 378 iface.IfaceProp = val;
361 Test.AssertEquals(val, iface.IfaceProp); 379 Test.AssertEquals(val, iface.IfaceProp);
380 iface.Dispose();
362 } 381 }
363 382
364 public static void test_csharp_multi_valued_prop() 383 public static void test_csharp_multi_valued_prop()
@@ -367,6 +386,7 @@ class TestCsharpProperties
367 obj.MultiValuedProp = (1, 2); 386 obj.MultiValuedProp = (1, 2);
368 var ret = obj.MultiValuedProp; 387 var ret = obj.MultiValuedProp;
369 Test.AssertEquals(ret, (1, 2)); 388 Test.AssertEquals(ret, (1, 2));
389 obj.Dispose();
370 } 390 }
371} 391}
372 392
@@ -386,6 +406,7 @@ class TestEoGrandChildrenFinalize
386 { 406 {
387 Child obj = new Child(); 407 Child obj = new Child();
388 Test.AssertEquals(42, obj.receivedValue); 408 Test.AssertEquals(42, obj.receivedValue);
409 obj.Dispose();
389 } 410 }
390 411
391 public sealed class GrandChild : Dummy.Child 412 public sealed class GrandChild : Dummy.Child
@@ -409,6 +430,7 @@ class TestEoGrandChildrenFinalize
409 { 430 {
410 GrandChild obj = new GrandChild(); 431 GrandChild obj = new GrandChild();
411 Test.AssertEquals(-42, obj.receivedValue); 432 Test.AssertEquals(-42, obj.receivedValue);
433 obj.Dispose();
412 } 434 }
413} 435}
414 436
@@ -429,7 +451,7 @@ class TestConstructors
429 var obj = new Dummy.Child(null, a, b, iface_prop); 451 var obj = new Dummy.Child(null, a, b, iface_prop);
430#endif 452#endif
431 Test.AssertEquals(iface_prop, obj.IfaceProp); 453 Test.AssertEquals(iface_prop, obj.IfaceProp);
432 454 obj.Dispose();
433#if EFL_BETA 455#if EFL_BETA
434 obj = new Dummy.Child(parent: null, ifaceProp : iface_prop, doubleParamsA : a, doubleParamsB : b, 456 obj = new Dummy.Child(parent: null, ifaceProp : iface_prop, doubleParamsA : a, doubleParamsB : b,
435 obligatoryBetaCtor : beta, 457 obligatoryBetaCtor : beta,
@@ -443,6 +465,7 @@ class TestConstructors
443 Test.Assert(obj.ObligatoryBetaCtorWasCalled); 465 Test.Assert(obj.ObligatoryBetaCtorWasCalled);
444 Test.Assert(obj.OptionalBetaCtorWasCalled); 466 Test.Assert(obj.OptionalBetaCtorWasCalled);
445#endif 467#endif
468 obj.Dispose();
446 } 469 }
447 470
448 public static void test_optional_constructor() 471 public static void test_optional_constructor()
@@ -457,6 +480,7 @@ class TestConstructors
457 var obj = new Dummy.Child(null, a, b); 480 var obj = new Dummy.Child(null, a, b);
458#endif 481#endif
459 Test.Assert(!obj.GetIfaceWasSet()); 482 Test.Assert(!obj.GetIfaceWasSet());
483 obj.Dispose();
460 } 484 }
461} 485}
462 486
@@ -470,6 +494,7 @@ class TestInterfaceConcrete
470 494
471 iface.IfaceProp = 1970; 495 iface.IfaceProp = 1970;
472 Test.AssertEquals(iface.IfaceProp, 1970); 496 Test.AssertEquals(iface.IfaceProp, 1970);
497 obj.Dispose();
473 } 498 }
474} 499}
475 500
@@ -482,6 +507,7 @@ class TestProvider
482 Dummy.Numberwrapper provider = obj.FindProvider(typeof(Dummy.Numberwrapper)) as Dummy.Numberwrapper; 507 Dummy.Numberwrapper provider = obj.FindProvider(typeof(Dummy.Numberwrapper)) as Dummy.Numberwrapper;
483 Test.AssertEquals(provider.GetType(), typeof(Dummy.Numberwrapper)); 508 Test.AssertEquals(provider.GetType(), typeof(Dummy.Numberwrapper));
484 Test.AssertEquals(provider.GetNumber(), 1999); 509 Test.AssertEquals(provider.GetNumber(), 1999);
510 obj.Dispose();
485 } 511 }
486 512
487 private class ProviderHolder : Dummy.TestObject 513 private class ProviderHolder : Dummy.TestObject
@@ -526,7 +552,7 @@ class TestProvider
526 provider = obj.CallFindProviderForIface(); 552 provider = obj.CallFindProviderForIface();
527 Test.AssertNotNull(provider, msg : "Provider of ITestIFace must not be null"); 553 Test.AssertNotNull(provider, msg : "Provider of ITestIFace must not be null");
528 Test.AssertEquals(provider.Name, obj.ProviderName, "Provider name does not match expected"); 554 Test.AssertEquals(provider.Name, obj.ProviderName, "Provider name does not match expected");
529 555 obj.Dispose();
530 } 556 }
531} 557}
532 558
@@ -542,6 +568,7 @@ class TestObjectDeletion
542 part.Del(); 568 part.Del();
543 569
544 Test.AssertNull(obj.OnePart); 570 Test.AssertNull(obj.OnePart);
571 obj.Dispose();
545 } 572 }
546} 573}
547 574
@@ -564,12 +591,14 @@ class TestProtectedInterfaceMembers
564 { 591 {
565 var obj = new Dummy.TestObject(); 592 var obj = new Dummy.TestObject();
566 Test.AssertEquals(obj.CallMethodProtected(42), -42); 593 Test.AssertEquals(obj.CallMethodProtected(42), -42);
594 obj.Dispose();
567 } 595 }
568 596
569 public static void test_protected_interface_in_inherited_class_called_from_c() 597 public static void test_protected_interface_in_inherited_class_called_from_c()
570 { 598 {
571 var obj = new MyObject(); 599 var obj = new MyObject();
572 Test.AssertEquals(obj.CallMethodProtected(42), 42 * 42); 600 Test.AssertEquals(obj.CallMethodProtected(42), 42 * 42);
601 obj.Dispose();
573 } 602 }
574 603
575 public static void test_interface_skipped_protected() 604 public static void test_interface_skipped_protected()
@@ -640,6 +669,7 @@ class TestHiddenClasses
640 var hidden = obj.HiddenObject; 669 var hidden = obj.HiddenObject;
641 670
642 Test.AssertEquals(hidden.Name, "hidden_object"); 671 Test.AssertEquals(hidden.Name, "hidden_object");
672 obj.Dispose();
643 } 673 }
644} 674}
645 675
diff --git a/src/tests/efl_mono/EoPromises.cs b/src/tests/efl_mono/EoPromises.cs
index 18acbe8..d16a762 100644
--- a/src/tests/efl_mono/EoPromises.cs
+++ b/src/tests/efl_mono/EoPromises.cs
@@ -72,6 +72,7 @@ class TestEoPromises
72 loop.Iterate(); 72 loop.Iterate();
73 Test.Assert(callbackCalled, "Future callback must have been called."); 73 Test.Assert(callbackCalled, "Future callback must have been called.");
74 Test.AssertEquals(receivedValue, sentValue); 74 Test.AssertEquals(receivedValue, sentValue);
75 obj.Dispose();
75 } 76 }
76 77
77 public static void test_object_promise_cancel() 78 public static void test_object_promise_cancel()
@@ -97,6 +98,7 @@ class TestEoPromises
97 loop.Iterate(); 98 loop.Iterate();
98 Test.Assert(callbackCalled, "Future callback must have been called."); 99 Test.Assert(callbackCalled, "Future callback must have been called.");
99 Test.AssertEquals(receivedError, sentError); 100 Test.AssertEquals(receivedError, sentError);
101 obj.Dispose();
100 } 102 }
101 103
102} 104}
@@ -144,6 +146,7 @@ class TestEoAsyncMethods
144 int receivedValue; 146 int receivedValue;
145 v.Get(out receivedValue); 147 v.Get(out receivedValue);
146 Test.AssertEquals(receivedValue, sentValue); 148 Test.AssertEquals(receivedValue, sentValue);
149 obj.Dispose();
147 } 150 }
148 151
149 public static void test_async_cancel() 152 public static void test_async_cancel()
@@ -173,6 +176,8 @@ class TestEoAsyncMethods
173 } 176 }
174 177
175 Test.Assert(raised, "AggregateException must have been raised."); 178 Test.Assert(raised, "AggregateException must have been raised.");
179 cancelSrc.Dispose();
180 obj.Dispose();
176 } 181 }
177 182
178 public static void test_async_reject() 183 public static void test_async_reject()
@@ -205,6 +210,7 @@ class TestEoAsyncMethods
205 } 210 }
206 211
207 Test.Assert(raised, "AggregateException must have been raised."); 212 Test.Assert(raised, "AggregateException must have been raised.");
213 obj.Dispose();
208 } 214 }
209} 215}
210} 216}
diff --git a/src/tests/efl_mono/Errors.cs b/src/tests/efl_mono/Errors.cs
index 94156e9..d3b1c69 100644
--- a/src/tests/efl_mono/Errors.cs
+++ b/src/tests/efl_mono/Errors.cs
@@ -53,6 +53,7 @@ class TestEolianError
53 var obj = new Overrider(); 53 var obj = new Overrider();
54 54
55 Test.AssertRaises<Efl.EflException>(obj.CallChildrenRaiseError); 55 Test.AssertRaises<Efl.EflException>(obj.CallChildrenRaiseError);
56 obj.Dispose();
56 } 57 }
57 58
58 // return eina_error 59 // return eina_error
@@ -70,6 +71,7 @@ class TestEolianError
70 error = obj.ReturnsError(); 71 error = obj.ReturnsError();
71 72
72 Test.AssertEquals(expected, error); 73 Test.AssertEquals(expected, error);
74 obj.Dispose();
73 } 75 }
74 76
75 class ReturnOverride : Dummy.TestObject { 77 class ReturnOverride : Dummy.TestObject {
@@ -97,6 +99,7 @@ class TestEolianError
97 error = obj.ReturnsError(); 99 error = obj.ReturnsError();
98 100
99 Test.AssertEquals(new Eina.Error(expected * 2), error); 101 Test.AssertEquals(new Eina.Error(expected * 2), error);
102 obj.Dispose();
100 } 103 }
101 104
102 // events 105 // events
@@ -114,11 +117,13 @@ class TestEolianError
114 // An event whose managed delegate generates an exception 117 // An event whose managed delegate generates an exception
115 // must set an eina_error so it can be reported back to 118 // must set an eina_error so it can be reported back to
116 // the managed code 119 // the managed code
117 var obj = new Dummy.TestObject(); 120 var obj = new Dummy.TestObject();
118 Listener listener = new Listener(); 121 Listener listener = new Listener();
119 obj.EvtWithIntEvent += listener.callback; 122 obj.EvtWithIntEvent += listener.callback;
120 123
121 Test.AssertRaises<Efl.EflException>(() => { obj.EmitEventWithInt(2); }); 124 Test.AssertRaises<Efl.EflException>(() =>
125 { obj.EmitEventWithInt(2); });
126 obj.Dispose();
122 } 127 }
123} 128}
124} 129}
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index 4e31375..88a7e8b 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -36,6 +36,7 @@ class TestEoEvents
36 Eina.Value v = new Eina.Value(Eina.ValueType.Int32); 36 Eina.Value v = new Eina.Value(Eina.ValueType.Int32);
37 v.Set(0); 37 v.Set(0);
38 loop.Quit(v); 38 loop.Quit(v);
39 v.Dispose();
39 } 40 }
40 protected void another_callback(object sender, EventArgs e) { } 41 protected void another_callback(object sender, EventArgs e) { }
41 42
@@ -70,6 +71,7 @@ class TestEoEvents
70 obj.EmitEventWithString("Some args"); 71 obj.EmitEventWithString("Some args");
71 72
72 Test.AssertEquals("Some args", received_string); 73 Test.AssertEquals("Some args", received_string);
74 obj.Dispose();
73 } 75 }
74 76
75 public static void event_with_int_payload() 77 public static void event_with_int_payload()
@@ -84,6 +86,7 @@ class TestEoEvents
84 obj.EmitEventWithInt(-1984); 86 obj.EmitEventWithInt(-1984);
85 87
86 Test.AssertEquals(-1984, received_int); 88 Test.AssertEquals(-1984, received_int);
89 obj.Dispose();
87 } 90 }
88 91
89 public static void event_with_bool_payload() 92 public static void event_with_bool_payload()
@@ -102,6 +105,7 @@ class TestEoEvents
102 obj.EmitEventWithBool(false); 105 obj.EmitEventWithBool(false);
103 106
104 Test.AssertEquals(false, received_bool); 107 Test.AssertEquals(false, received_bool);
108 obj.Dispose();
105 } 109 }
106 110
107 public static void event_with_uint_payload() 111 public static void event_with_uint_payload()
@@ -115,6 +119,7 @@ class TestEoEvents
115 obj.EmitEventWithUint(0xbeef); 119 obj.EmitEventWithUint(0xbeef);
116 120
117 Test.AssertEquals<uint>(0xbeef, received_uint); 121 Test.AssertEquals<uint>(0xbeef, received_uint);
122 obj.Dispose();
118 } 123 }
119 124
120 public static void event_with_float_payload() 125 public static void event_with_float_payload()
@@ -128,6 +133,7 @@ class TestEoEvents
128 obj.EmitEventWithFloat(3.14f); 133 obj.EmitEventWithFloat(3.14f);
129 134
130 Test.AssertAlmostEquals(3.14f, received_float); 135 Test.AssertAlmostEquals(3.14f, received_float);
136 obj.Dispose();
131 } 137 }
132 138
133 public static void event_with_double_payload() 139 public static void event_with_double_payload()
@@ -142,6 +148,7 @@ class TestEoEvents
142 obj.EmitEventWithDouble(reference); 148 obj.EmitEventWithDouble(reference);
143 149
144 Test.AssertAlmostEquals(reference, received_double); 150 Test.AssertAlmostEquals(reference, received_double);
151 obj.Dispose();
145 } 152 }
146 153
147 public static void event_with_object_payload() 154 public static void event_with_object_payload()
@@ -158,6 +165,8 @@ class TestEoEvents
158 obj.EmitEventWithObj(sent_obj); 165 obj.EmitEventWithObj(sent_obj);
159 166
160 Test.AssertEquals(sent_obj, received_obj); 167 Test.AssertEquals(sent_obj, received_obj);
168 sent_obj.Dispose();
169 obj.Dispose();
161 } 170 }
162 171
163 public static void event_with_error_payload() 172 public static void event_with_error_payload()
@@ -174,6 +183,7 @@ class TestEoEvents
174 obj.EmitEventWithError(sent_error); 183 obj.EmitEventWithError(sent_error);
175 184
176 Test.AssertEquals(sent_error, received_error); 185 Test.AssertEquals(sent_error, received_error);
186 obj.Dispose();
177 } 187 }
178 188
179 public static void event_with_struct_payload() 189 public static void event_with_struct_payload()
@@ -191,6 +201,7 @@ class TestEoEvents
191 obj.EmitEventWithStruct(sent_struct); 201 obj.EmitEventWithStruct(sent_struct);
192 202
193 Test.AssertEquals(sent_struct.Fstring, received_struct.Fstring); 203 Test.AssertEquals(sent_struct.Fstring, received_struct.Fstring);
204 obj.Dispose();
194 } 205 }
195 206
196#if EFL_BETA 207#if EFL_BETA
@@ -208,6 +219,7 @@ class TestEoEvents
208 obj.EmitEventWithStructComplex(sent_struct); 219 obj.EmitEventWithStructComplex(sent_struct);
209 220
210 Test.AssertEquals(sent_struct.Fobj, received_struct.Fobj); 221 Test.AssertEquals(sent_struct.Fobj, received_struct.Fobj);
222 obj.Dispose();
211 } 223 }
212#endif 224#endif
213 225
@@ -230,7 +242,12 @@ class TestEoEvents
230 Test.AssertEquals(sent.Length, received.Length); 242 Test.AssertEquals(sent.Length, received.Length);
231 var pairs = sent.Zip(received, (string sentItem, string receivedItem) => new { Sent = sentItem, Received = receivedItem } ); 243 var pairs = sent.Zip(received, (string sentItem, string receivedItem) => new { Sent = sentItem, Received = receivedItem } );
232 foreach (var pair in pairs) 244 foreach (var pair in pairs)
245 {
233 Test.AssertEquals(pair.Sent, pair.Received); 246 Test.AssertEquals(pair.Sent, pair.Received);
247 }
248 sent.Dispose();
249 received.Dispose();
250 obj.Dispose();
234 } 251 }
235} 252}
236 253
@@ -253,6 +270,7 @@ class TestEventAddRemove
253 obj.EvtWithIntEvent -= evtCb; 270 obj.EvtWithIntEvent -= evtCb;
254 obj.EmitEventWithInt(42); 271 obj.EmitEventWithInt(42);
255 Test.Assert(!called); 272 Test.Assert(!called);
273 obj.Dispose();
256 } 274 }
257} 275}
258 276
@@ -270,6 +288,7 @@ class TestInterfaceEvents
270 obj.NonconflictedEvent += cb; 288 obj.NonconflictedEvent += cb;
271 obj.EmitNonconflicted(); 289 obj.EmitNonconflicted();
272 Test.Assert(called); 290 Test.Assert(called);
291 obj.Dispose();
273 } 292 }
274} 293}
275 294
@@ -290,7 +309,7 @@ class TestEventNaming
290 obj.EmitEventWithUnder(); 309 obj.EmitEventWithUnder();
291 310
292 Test.Assert(test_called); 311 Test.Assert(test_called);
293 312 obj.Dispose();
294 } 313 }
295} 314}
296 315
@@ -342,6 +361,7 @@ class TestEventWithDeadWrappers
342 Test.CollectAndIterate(); 361 Test.CollectAndIterate();
343 362
344 Test.AssertNull(wref.Target); 363 Test.AssertNull(wref.Target);
364 manager.Dispose();
345 } 365 }
346 366
347} 367}
diff --git a/src/tests/efl_mono/FunctionPointerMarshalling.cs b/src/tests/efl_mono/FunctionPointerMarshalling.cs
index 8c7fa41..16bb60b 100644
--- a/src/tests/efl_mono/FunctionPointerMarshalling.cs
+++ b/src/tests/efl_mono/FunctionPointerMarshalling.cs
@@ -41,6 +41,9 @@ class TestFunctionPointerMarshalling
41 41
42 Test.Assert(called, "Callback was not called"); 42 Test.Assert(called, "Callback was not called");
43 Test.AssertEquals(reference, buf.Steal()); 43 Test.AssertEquals(reference, buf.Steal());
44 v.Dispose();
45 buf.Dispose();
46 obj.Dispose();
44 } 47 }
45} 48}
46} 49}
diff --git a/src/tests/efl_mono/FunctionPointers.cs b/src/tests/efl_mono/FunctionPointers.cs
index 5c32669..62ec9c3 100644
--- a/src/tests/efl_mono/FunctionPointers.cs
+++ b/src/tests/efl_mono/FunctionPointers.cs
@@ -53,6 +53,7 @@ class TestFunctionPointers
53 53
54 Test.Assert(called, "call_callback must call a callback"); 54 Test.Assert(called, "call_callback must call a callback");
55 Test.AssertEquals(42 * 2, x); 55 Test.AssertEquals(42 * 2, x);
56 obj.Dispose();
56 } 57 }
57 58
58 public static void set_callback_with_lambda() 59 public static void set_callback_with_lambda()
@@ -71,6 +72,7 @@ class TestFunctionPointers
71 72
72 Test.Assert(called, "call_callback must call a callback"); 73 Test.Assert(called, "call_callback must call a callback");
73 Test.AssertEquals(37 + 4, x); 74 Test.AssertEquals(37 + 4, x);
75 obj.Dispose();
74 } 76 }
75 77
76 public static void replace_callback() 78 public static void replace_callback()
@@ -96,6 +98,7 @@ class TestFunctionPointers
96 x = obj.CallCallback(42); 98 x = obj.CallCallback(42);
97 Test.Assert(new_called, "call_callback must call a callback"); 99 Test.Assert(new_called, "call_callback must call a callback");
98 Test.AssertEquals(42 * 42, x); 100 Test.AssertEquals(42 * 42, x);
101 obj.Dispose();
99 } 102 }
100 103
101 class NoOverride : Dummy.TestObject { 104 class NoOverride : Dummy.TestObject {
@@ -112,6 +115,7 @@ class TestFunctionPointers
112 115
113 Test.Assert(called, "call_callback must call a callback"); 116 Test.Assert(called, "call_callback must call a callback");
114 Test.AssertEquals(42 * 3, x); 117 Test.AssertEquals(42 * 3, x);
118 obj.Dispose();
115 } 119 }
116 120
117 class WithOverride : Dummy.TestObject { 121 class WithOverride : Dummy.TestObject {
@@ -151,6 +155,7 @@ class TestFunctionPointers
151 155
152 Test.Assert(called, "call_callback must call a callback"); 156 Test.Assert(called, "call_callback must call a callback");
153 Test.AssertEquals(42 * 3, x); 157 Test.AssertEquals(42 * 3, x);
158 obj.Dispose();
154 } 159 }
155 160
156 // These are needed due to issues calling methods on obj from the GC thread (where the 161 // These are needed due to issues calling methods on obj from the GC thread (where the
@@ -202,7 +207,7 @@ class TestFunctionPointers
202 207
203 Test.Assert(called, "call_callback must call a callback"); 208 Test.Assert(called, "call_callback must call a callback");
204 Test.AssertEquals(42 * 2, x); 209 Test.AssertEquals(42 * 2, x);
205 210 obj.Dispose();
206 } 211 }
207} 212}
208 213
diff --git a/src/tests/efl_mono/Hash.cs b/src/tests/efl_mono/Hash.cs
index e064e47..abb18df 100644
--- a/src/tests/efl_mono/Hash.cs
+++ b/src/tests/efl_mono/Hash.cs
@@ -21,6 +21,7 @@ class TestHash
21 Test.AssertEquals(hash.Count, 2); 21 Test.AssertEquals(hash.Count, 2);
22 22
23 Test.Assert(!hash.DelByValue(200)); 23 Test.Assert(!hash.DelByValue(200));
24 hash.Dispose();
24 } 25 }
25 26
26 public static void test_del_value_string() 27 public static void test_del_value_string()
@@ -39,6 +40,7 @@ class TestHash
39 Test.AssertEquals(hash.Count, 2); 40 Test.AssertEquals(hash.Count, 2);
40 41
41 Test.Assert(!hash.DelByValue("Elementary")); 42 Test.Assert(!hash.DelByValue("Elementary"));
43 hash.Dispose();
42 } 44 }
43 45
44 public static void test_del_key() 46 public static void test_del_key()
@@ -50,6 +52,7 @@ class TestHash
50 52
51 hash.DelByKey(1); 53 hash.DelByKey(1);
52 Test.AssertEquals(hash.Count, 2); 54 Test.AssertEquals(hash.Count, 2);
55 hash.Dispose();
53 } 56 }
54} 57}
55} // namespace TestSuite 58} // namespace TestSuite
diff --git a/src/tests/efl_mono/Inheritance.cs b/src/tests/efl_mono/Inheritance.cs
index 387b042..06c4d1b 100644
--- a/src/tests/efl_mono/Inheritance.cs
+++ b/src/tests/efl_mono/Inheritance.cs
@@ -49,7 +49,7 @@ class TestInheritance
49 return "Hello World"; 49 return "Hello World";
50 } 50 }
51 } 51 }
52 52
53 internal class Inherit3Parent : Dummy.TestObject 53 internal class Inherit3Parent : Dummy.TestObject
54 { 54 {
55 public bool disposed = false; 55 public bool disposed = false;
@@ -95,6 +95,7 @@ class TestInheritance
95 var obj = new Inherit1(); 95 var obj = new Inherit1();
96 int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj); 96 int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj);
97 Test.AssertEquals (50, i); 97 Test.AssertEquals (50, i);
98 obj.Dispose();
98 } 99 }
99 100
100 public static void test_inherit_from_iface() 101 public static void test_inherit_from_iface()
@@ -104,6 +105,7 @@ class TestInheritance
104 Test.AssertEquals (50, i); 105 Test.AssertEquals (50, i);
105 string s = Dummy.InheritHelper.ReceiveDummyAndCallInStringshare(obj); 106 string s = Dummy.InheritHelper.ReceiveDummyAndCallInStringshare(obj);
106 Test.AssertEquals ("Hello World", s); 107 Test.AssertEquals ("Hello World", s);
108 obj.Dispose();
107 } 109 }
108 110
109 private static void CreateAndCheckInheritedObjects(out WeakReference parentWRef, out WeakReference childWRef) 111 private static void CreateAndCheckInheritedObjects(out WeakReference parentWRef, out WeakReference childWRef)
@@ -127,8 +129,8 @@ class TestInheritance
127 Test.AssertEquals(false, parent.disposed); 129 Test.AssertEquals(false, parent.disposed);
128 Test.AssertEquals(false, parent.childDisposed); 130 Test.AssertEquals(false, parent.childDisposed);
129 131
130 parent = null; 132 child.Dispose();
131 child = null; 133 parent.Dispose();
132 } 134 }
133 135
134 public static void test_inherit_lifetime() 136 public static void test_inherit_lifetime()
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index 144318b..bb6ba3b 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -32,7 +32,8 @@ public static class TestModel {
32 { 32 {
33 Efl.Loop loop = Efl.App.AppMain; 33 Efl.Loop loop = Efl.App.AppMain;
34 34
35 CreateModel(loop); 35 var model = CreateModel(loop);
36 model.Dispose();
36 } 37 }
37 38
38 internal static async Task EasyModelExtractionAsync (Efl.Loop loop) 39 internal static async Task EasyModelExtractionAsync (Efl.Loop loop)
@@ -49,6 +50,8 @@ public static class TestModel {
49 Test.AssertEquals(r.Name, "Tomato"); 50 Test.AssertEquals(r.Name, "Tomato");
50 51
51 loop.End(); 52 loop.End();
53 model.Dispose();
54 veggies.Dispose();
52 } 55 }
53 56
54 public static void easy_model_extraction () 57 public static void easy_model_extraction ()
@@ -77,6 +80,8 @@ public static class TestModel {
77 80
78 Test.Assert(callbackCalled, "Property bound callback must have been called."); 81 Test.Assert(callbackCalled, "Property bound callback must have been called.");
79 Test.AssertEquals(propertyBound, "style"); 82 Test.AssertEquals(propertyBound, "style");
83 factory.Dispose();
84 parent.Dispose();
80 } 85 }
81} 86}
82 87
diff --git a/src/tests/efl_mono/Parts.cs b/src/tests/efl_mono/Parts.cs
index 33ae37d..3e2da24 100644
--- a/src/tests/efl_mono/Parts.cs
+++ b/src/tests/efl_mono/Parts.cs
@@ -31,6 +31,7 @@ public static class TestParts
31 { 31 {
32 var t = new Dummy.PartHolder(); 32 var t = new Dummy.PartHolder();
33 do_part_test(t); 33 do_part_test(t);
34 t.Dispose();
34 } 35 }
35 36
36 private class Child : Dummy.PartHolder 37 private class Child : Dummy.PartHolder
@@ -41,6 +42,7 @@ public static class TestParts
41 public static void inherited_part_test() { 42 public static void inherited_part_test() {
42 var t = new Child(); 43 var t = new Child();
43 do_part_test(t); 44 do_part_test(t);
45 t.Dispose();
44 } 46 }
45 47
46 private static void do_part_test(Dummy.PartHolder t) 48 private static void do_part_test(Dummy.PartHolder t)
@@ -66,6 +68,8 @@ public static class TestMVVMParts
66 var error = bindablePart.Markup().Bind("name"); 68 var error = bindablePart.Markup().Bind("name");
67 69
68 Test.AssertEquals(error, Eina.Error.NO_ERROR); 70 Test.AssertEquals(error, Eina.Error.NO_ERROR);
71 factory.Dispose();
72 parent.Dispose();
69 } 73 }
70 74
71 public static void mvvm_factory_properties() 75 public static void mvvm_factory_properties()
@@ -78,6 +82,9 @@ public static class TestMVVMParts
78 var error = factory.IconPart().BindFactory(iconFactory); 82 var error = factory.IconPart().BindFactory(iconFactory);
79 83
80 Test.AssertEquals(error, Eina.Error.NO_ERROR); 84 Test.AssertEquals(error, Eina.Error.NO_ERROR);
85 iconFactory.Dispose();
86 factory.Dispose();
87 parent.Dispose();
81 } 88 }
82} 89}
83 90
@@ -92,6 +99,7 @@ public static class TestNamedParts
92 Test.AssertEquals("part_one", p1.GetName()); 99 Test.AssertEquals("part_one", p1.GetName());
93 Test.Assert(p2 is Dummy.TestObject); 100 Test.Assert(p2 is Dummy.TestObject);
94 Test.AssertEquals("part_two", p2.GetName()); 101 Test.AssertEquals("part_two", p2.GetName());
102 obj.Dispose();
95 } 103 }
96} 104}
97 105
diff --git a/src/tests/efl_mono/Promises.cs b/src/tests/efl_mono/Promises.cs
index 8b50e32..7a7afff 100644
--- a/src/tests/efl_mono/Promises.cs
+++ b/src/tests/efl_mono/Promises.cs
@@ -30,6 +30,7 @@ class TestPromises
30 Test.Assert(cleanCalled, "Promise clean callback should have been called."); 30 Test.Assert(cleanCalled, "Promise clean callback should have been called.");
31 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); }); 31 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); });
32 Test.AssertRaises<ObjectDisposedException>(future.Cancel); 32 Test.AssertRaises<ObjectDisposedException>(future.Cancel);
33 promise.Dispose();
33 } 34 }
34 35
35 public static void test_simple_resolve() 36 public static void test_simple_resolve()
@@ -55,6 +56,8 @@ class TestPromises
55 56
56 Test.Assert(callbackCalled, "Future callback should have been called."); 57 Test.Assert(callbackCalled, "Future callback should have been called.");
57 Test.AssertEquals(received_value, reference_value); 58 Test.AssertEquals(received_value, reference_value);
59 reference_value.Dispose();
60 promise.Dispose();
58 } 61 }
59 62
60 public static void test_simple_with_object() 63 public static void test_simple_with_object()
@@ -74,12 +77,16 @@ class TestPromises
74 77
75 Eina.Value referenceValue = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32); 78 Eina.Value referenceValue = new Eina.Value(Eina.ValueType.Array, Eina.ValueType.Int32);
76 referenceValue.Append(32); 79 referenceValue.Append(32);
77 promise.Resolve(new Eina.Value(referenceValue)); 80 var tmp = new Eina.Value(referenceValue);
81 promise.Resolve(tmp);
78 82
79 loop.Iterate(); 83 loop.Iterate();
80 84
81 Test.Assert(callbackCalled, "Future callback should have been called."); 85 Test.Assert(callbackCalled, "Future callback should have been called.");
82 Test.AssertEquals(receivedValue, referenceValue); 86 Test.AssertEquals(receivedValue, referenceValue);
87 tmp.Dispose();
88 referenceValue.Dispose();
89 promise.Dispose();
83 } 90 }
84 91
85 public static void test_simple_reject() 92 public static void test_simple_reject()
@@ -106,6 +113,7 @@ class TestPromises
106 113
107 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); }); 114 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); });
108 Test.AssertRaises<ObjectDisposedException>(future.Cancel); 115 Test.AssertRaises<ObjectDisposedException>(future.Cancel);
116 promise.Dispose();
109 } 117 }
110 118
111 public static void test_simple_future_cancel() 119 public static void test_simple_future_cancel()
@@ -128,6 +136,7 @@ class TestPromises
128 Test.Assert(promiseCallbackCalled, "Promise cancel callback should have been called."); 136 Test.Assert(promiseCallbackCalled, "Promise cancel callback should have been called.");
129 Test.Assert(callbackCalled, "Future callback should have been called."); 137 Test.Assert(callbackCalled, "Future callback should have been called.");
130 Test.AssertEquals(received_error, Eina.Error.ECANCELED); 138 Test.AssertEquals(received_error, Eina.Error.ECANCELED);
139 promise.Dispose();
131 } 140 }
132 141
133 142
@@ -172,6 +181,8 @@ class TestPromises
172 181
173 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); }); 182 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); });
174 Test.AssertRaises<ObjectDisposedException>(future.Cancel); 183 Test.AssertRaises<ObjectDisposedException>(future.Cancel);
184 reference_value.Dispose();
185 promise.Dispose();
175 } 186 }
176 187
177 public static void test_then_chain_array() 188 public static void test_then_chain_array()
@@ -217,6 +228,8 @@ class TestPromises
217 228
218 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); }); 229 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); });
219 Test.AssertRaises<ObjectDisposedException>(future.Cancel); 230 Test.AssertRaises<ObjectDisposedException>(future.Cancel);
231 reference_value.Dispose();
232 promise.Dispose();
220 } 233 }
221 234
222 public static void test_cancel_after_resolve() 235 public static void test_cancel_after_resolve()
@@ -244,6 +257,7 @@ class TestPromises
244 257
245 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); }); 258 Test.AssertRaises<ObjectDisposedException>(() => { promise.Resolve(null); });
246 Test.AssertRaises<ObjectDisposedException>(future.Cancel); 259 Test.AssertRaises<ObjectDisposedException>(future.Cancel);
260 promise.Dispose();
247 } 261 }
248 262
249 public static void test_constructor_with_callback() 263 public static void test_constructor_with_callback()
@@ -270,6 +284,9 @@ class TestPromises
270 284
271 Test.Assert(callbackCalled, "Future callback should have been called."); 285 Test.Assert(callbackCalled, "Future callback should have been called.");
272 Test.AssertEquals(received_value, reference_value); 286 Test.AssertEquals(received_value, reference_value);
287 promise.Dispose();
288 loop.Dispose();
289 reference_value.Dispose();
273 } 290 }
274 291
275 public static void test_reject_on_disposal() 292 public static void test_reject_on_disposal()
diff --git a/src/tests/efl_mono/Strbuf.cs b/src/tests/efl_mono/Strbuf.cs
index fa7ccfd..7cd96cb 100644
--- a/src/tests/efl_mono/Strbuf.cs
+++ b/src/tests/efl_mono/Strbuf.cs
@@ -29,6 +29,7 @@ class TestStrBuf
29 29
30 Test.AssertEquals("Here's Jonnny!".Length, buf.Length); 30 Test.AssertEquals("Here's Jonnny!".Length, buf.Length);
31 Test.AssertEquals("Here's Johnny!", buf.Steal()); 31 Test.AssertEquals("Here's Johnny!", buf.Steal());
32 buf.Dispose();
32 } 33 }
33 34
34 public static void test_tostring() 35 public static void test_tostring()
@@ -39,6 +40,7 @@ class TestStrBuf
39 buf.Append("World!"); 40 buf.Append("World!");
40 41
41 Test.AssertEquals("Hello World!", buf.ToString()); 42 Test.AssertEquals("Hello World!", buf.ToString());
43 buf.Dispose();
42 } 44 }
43 45
44 public static void test_eolian() 46 public static void test_eolian()
@@ -50,6 +52,8 @@ class TestStrBuf
50 obj.AppendToStrbuf(buf, " to buf"); 52 obj.AppendToStrbuf(buf, " to buf");
51 53
52 Test.AssertEquals("Appended to buf", buf.Steal()); 54 Test.AssertEquals("Appended to buf", buf.Steal());
55 buf.Dispose();
56 obj.Dispose();
53 } 57 }
54 58
55 private class Appender : Dummy.TestObject 59 private class Appender : Dummy.TestObject
@@ -79,6 +83,8 @@ class TestStrBuf
79 83
80 Test.Assert(obj.called); 84 Test.Assert(obj.called);
81 Test.AssertEquals("Is this virtual?", buf.Steal()); 85 Test.AssertEquals("Is this virtual?", buf.Steal());
86 buf.Dispose();
87 obj.Dispose();
82 } 88 }
83} 89}
84} // namespace TestSuite 90} // namespace TestSuite
diff --git a/src/tests/efl_mono/Strings.cs b/src/tests/efl_mono/Strings.cs
index 43c6717..afbf282 100644
--- a/src/tests/efl_mono/Strings.cs
+++ b/src/tests/efl_mono/Strings.cs
@@ -28,6 +28,7 @@ class TestStrings
28 String sent = "in_string"; 28 String sent = "in_string";
29 String returned = obj.InString(sent); 29 String returned = obj.InString(sent);
30 Test.AssertEquals(sent, returned); 30 Test.AssertEquals(sent, returned);
31 obj.Dispose();
31 } 32 }
32 System.GC.Collect(); 33 System.GC.Collect();
33 } 34 }
@@ -41,6 +42,7 @@ class TestStrings
41 String sent = "in_own_string"; 42 String sent = "in_own_string";
42 String returned = obj.InOwnString(sent); 43 String returned = obj.InOwnString(sent);
43 Test.AssertEquals(sent, returned); 44 Test.AssertEquals(sent, returned);
45 obj.Dispose();
44 } 46 }
45 System.GC.Collect(); 47 System.GC.Collect();
46 } 48 }
@@ -51,6 +53,7 @@ class TestStrings
51 { 53 {
52 var obj = new Dummy.TestObject(); 54 var obj = new Dummy.TestObject();
53 Test.AssertEquals("string", obj.ReturnString()); 55 Test.AssertEquals("string", obj.ReturnString());
56 obj.Dispose();
54 } 57 }
55 System.GC.Collect(); 58 System.GC.Collect();
56 } 59 }
@@ -61,6 +64,7 @@ class TestStrings
61 { 64 {
62 var obj = new Dummy.TestObject(); 65 var obj = new Dummy.TestObject();
63 Test.AssertEquals("own_string", obj.ReturnOwnString()); 66 Test.AssertEquals("own_string", obj.ReturnOwnString());
67 obj.Dispose();
64 } 68 }
65 System.GC.Collect(); 69 System.GC.Collect();
66 } 70 }
@@ -73,6 +77,7 @@ class TestStrings
73 var obj = new Dummy.TestObject(); 77 var obj = new Dummy.TestObject();
74 obj.OutString(out str); 78 obj.OutString(out str);
75 Test.AssertEquals("out_string", str); 79 Test.AssertEquals("out_string", str);
80 obj.Dispose();
76 } 81 }
77 System.GC.Collect(); 82 System.GC.Collect();
78 } 83 }
@@ -86,6 +91,7 @@ class TestStrings
86 obj.OutOwnString(out str); 91 obj.OutOwnString(out str);
87 Test.AssertEquals(str.ToString(CultureInfo.CurrentCulture), 92 Test.AssertEquals(str.ToString(CultureInfo.CurrentCulture),
88 "out_own_string"); 93 "out_own_string");
94 obj.Dispose();
89 } 95 }
90 System.GC.Collect(); 96 System.GC.Collect();
91 } 97 }
@@ -143,6 +149,7 @@ class TestStrings
143 Test.AssertEquals(sent, obj.received_in); 149 Test.AssertEquals(sent, obj.received_in);
144 /* } */ 150 /* } */
145 System.GC.Collect(); 151 System.GC.Collect();
152 obj.Dispose();
146 } 153 }
147 154
148 /* The managed wrapper should take ownership of the in parameter */ 155 /* The managed wrapper should take ownership of the in parameter */
@@ -155,6 +162,7 @@ class TestStrings
155 Test.AssertEquals(sent, obj.received_in_own); 162 Test.AssertEquals(sent, obj.received_in_own);
156 /* } */ 163 /* } */
157 System.GC.Collect(); 164 System.GC.Collect();
165 obj.Dispose();
158 } 166 }
159 167
160 /* The managed wrapper still owns the returned C string. We need to cache it until 168 /* The managed wrapper still owns the returned C string. We need to cache it until
@@ -165,6 +173,7 @@ class TestStrings
165 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */ 173 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
166 Test.AssertEquals("inherited", obj.CallReturnString()); 174 Test.AssertEquals("inherited", obj.CallReturnString());
167 System.GC.Collect(); 175 System.GC.Collect();
176 obj.Dispose();
168 } 177 }
169 178
170 /* The managed wrapper must surrender the ownership to the C after the virtual call. */ 179 /* The managed wrapper must surrender the ownership to the C after the virtual call. */
@@ -174,6 +183,7 @@ class TestStrings
174 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */ 183 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
175 Test.AssertEquals("own_inherited", obj.CallReturnOwnString()); 184 Test.AssertEquals("own_inherited", obj.CallReturnOwnString());
176 System.GC.Collect(); 185 System.GC.Collect();
186 obj.Dispose();
177 } 187 }
178 188
179 /* The managed wrapper still owns the C string after the call. Like return without own, we may 189 /* The managed wrapper still owns the C string after the call. Like return without own, we may
@@ -184,6 +194,7 @@ class TestStrings
184 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */ 194 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
185 Test.AssertEquals("out_inherited", obj.CallOutString()); 195 Test.AssertEquals("out_inherited", obj.CallOutString());
186 System.GC.Collect(); 196 System.GC.Collect();
197 obj.Dispose();
187 } 198 }
188 199
189 /* The managed wrapper gives C the ownership of the filled out parameter */ 200 /* The managed wrapper gives C the ownership of the filled out parameter */
@@ -193,6 +204,7 @@ class TestStrings
193 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */ 204 /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
194 Test.AssertEquals("out_own_inherited", obj.CallOutOwnString()); 205 Test.AssertEquals("out_own_inherited", obj.CallOutOwnString());
195 System.GC.Collect(); 206 System.GC.Collect();
207 obj.Dispose();
196 } 208 }
197 209
198} 210}
@@ -206,6 +218,7 @@ class TestStringshare
206 String sent = "in_stringshare"; 218 String sent = "in_stringshare";
207 String returned = obj.InStringshare(sent); 219 String returned = obj.InStringshare(sent);
208 Test.AssertEquals(sent, returned); 220 Test.AssertEquals(sent, returned);
221 obj.Dispose();
209 } 222 }
210 System.GC.Collect(); 223 System.GC.Collect();
211 } 224 }
@@ -217,6 +230,7 @@ class TestStringshare
217 String sent = "in_own_stringshare"; 230 String sent = "in_own_stringshare";
218 String returned = obj.InOwnStringshare(sent); 231 String returned = obj.InOwnStringshare(sent);
219 Test.AssertEquals(sent, returned); 232 Test.AssertEquals(sent, returned);
233 obj.Dispose();
220 } 234 }
221 System.GC.Collect(); 235 System.GC.Collect();
222 } 236 }
@@ -226,6 +240,7 @@ class TestStringshare
226 { 240 {
227 var obj = new Dummy.TestObject(); 241 var obj = new Dummy.TestObject();
228 Test.AssertEquals("stringshare", obj.ReturnStringshare()); 242 Test.AssertEquals("stringshare", obj.ReturnStringshare());
243 obj.Dispose();
229 } 244 }
230 System.GC.Collect(); 245 System.GC.Collect();
231 } 246 }
@@ -235,6 +250,7 @@ class TestStringshare
235 { 250 {
236 var obj = new Dummy.TestObject(); 251 var obj = new Dummy.TestObject();
237 Test.AssertEquals("own_stringshare", obj.ReturnOwnStringshare()); 252 Test.AssertEquals("own_stringshare", obj.ReturnOwnStringshare());
253 obj.Dispose();
238 } 254 }
239 System.GC.Collect(); 255 System.GC.Collect();
240 } 256 }
@@ -246,6 +262,7 @@ class TestStringshare
246 var obj = new Dummy.TestObject(); 262 var obj = new Dummy.TestObject();
247 obj.OutStringshare(out str); 263 obj.OutStringshare(out str);
248 Test.AssertEquals("out_stringshare", str); 264 Test.AssertEquals("out_stringshare", str);
265 obj.Dispose();
249 } 266 }
250 System.GC.Collect(); 267 System.GC.Collect();
251 } 268 }
@@ -258,6 +275,7 @@ class TestStringshare
258 obj.OutOwnStringshare(out str); 275 obj.OutOwnStringshare(out str);
259 Test.AssertEquals(str.ToString(CultureInfo.CurrentCulture), 276 Test.AssertEquals(str.ToString(CultureInfo.CurrentCulture),
260 "out_own_stringshare"); 277 "out_own_stringshare");
278 obj.Dispose();
261 } 279 }
262 System.GC.Collect(); 280 System.GC.Collect();
263 } 281 }
@@ -310,6 +328,7 @@ class TestStringshare
310 String sent = "in_inherited"; 328 String sent = "in_inherited";
311 obj.CallInStringshare(sent); 329 obj.CallInStringshare(sent);
312 Test.AssertEquals(sent, obj.received_in); 330 Test.AssertEquals(sent, obj.received_in);
331 obj.Dispose();
313 } 332 }
314 333
315 public static void in_own_stringshare_from_virtual() 334 public static void in_own_stringshare_from_virtual()
@@ -318,6 +337,7 @@ class TestStringshare
318 String sent = "in_own_inherited"; 337 String sent = "in_own_inherited";
319 obj.CallInOwnStringshare(sent); 338 obj.CallInOwnStringshare(sent);
320 Test.AssertEquals(sent, obj.received_in_own); 339 Test.AssertEquals(sent, obj.received_in_own);
340 obj.Dispose();
321 } 341 }
322 342
323 public static void return_stringshare_from_virtual() 343 public static void return_stringshare_from_virtual()
@@ -325,6 +345,7 @@ class TestStringshare
325 var obj = new StringshareReturner(); 345 var obj = new StringshareReturner();
326 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks. 346 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
327 Test.AssertEquals("inherited", obj.CallReturnStringshare()); 347 Test.AssertEquals("inherited", obj.CallReturnStringshare());
348 obj.Dispose();
328 } 349 }
329 350
330 public static void return_own_stringshare_from_virtual() 351 public static void return_own_stringshare_from_virtual()
@@ -332,6 +353,7 @@ class TestStringshare
332 var obj = new StringshareReturner(); 353 var obj = new StringshareReturner();
333 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks. 354 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
334 Test.AssertEquals("own_inherited", obj.CallReturnOwnStringshare()); 355 Test.AssertEquals("own_inherited", obj.CallReturnOwnStringshare());
356 obj.Dispose();
335 } 357 }
336 358
337 public static void out_stringshare_from_virtual() 359 public static void out_stringshare_from_virtual()
@@ -339,6 +361,7 @@ class TestStringshare
339 var obj = new StringshareReturner(); 361 var obj = new StringshareReturner();
340 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks. 362 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
341 Test.AssertEquals("out_inherited", obj.CallOutStringshare()); 363 Test.AssertEquals("out_inherited", obj.CallOutStringshare());
364 obj.Dispose();
342 } 365 }
343 366
344 public static void out_own_stringshare_from_virtual() 367 public static void out_own_stringshare_from_virtual()
@@ -346,6 +369,7 @@ class TestStringshare
346 var obj = new StringshareReturner(); 369 var obj = new StringshareReturner();
347 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks. 370 // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
348 Test.AssertEquals("out_own_inherited", obj.CallOutOwnStringshare()); 371 Test.AssertEquals("out_own_inherited", obj.CallOutOwnStringshare());
372 obj.Dispose();
349 } 373 }
350} 374}
351 375
diff --git a/src/tests/efl_mono/Structs.cs b/src/tests/efl_mono/Structs.cs
index 66d4e3a..998610c 100644
--- a/src/tests/efl_mono/Structs.cs
+++ b/src/tests/efl_mono/Structs.cs
@@ -62,6 +62,7 @@ internal class TestStructs
62 var t = new Dummy.TestObject(); 62 var t = new Dummy.TestObject();
63 bool r = t.StructSimpleIn(simple); 63 bool r = t.StructSimpleIn(simple);
64 Test.Assert(r, "Function returned false"); 64 Test.Assert(r, "Function returned false");
65 t.Dispose();
65 } 66 }
66 67
67 /* 68 /*
@@ -95,6 +96,7 @@ internal class TestStructs
95 bool r = t.StructSimpleOut(out simple); 96 bool r = t.StructSimpleOut(out simple);
96 Test.Assert(r, "Function returned false"); 97 Test.Assert(r, "Function returned false");
97 checkStructSimple(simple); 98 checkStructSimple(simple);
99 t.Dispose();
98 } 100 }
99 101
100 /* 102 /*
@@ -122,6 +124,7 @@ internal class TestStructs
122 var t = new Dummy.TestObject(); 124 var t = new Dummy.TestObject();
123 var simple = t.StructSimpleReturn(); 125 var simple = t.StructSimpleReturn();
124 checkStructSimple(simple); 126 checkStructSimple(simple);
127 t.Dispose();
125 } 128 }
126 129
127 /* 130 /*
@@ -236,6 +239,7 @@ internal class TestStructs
236 t.CallStructSimpleIn(simple); 239 t.CallStructSimpleIn(simple);
237 Test.Assert(t.called); 240 Test.Assert(t.called);
238 Test.AssertEquals(simple.Fstring, t.received.Fstring); 241 Test.AssertEquals(simple.Fstring, t.received.Fstring);
242 t.Dispose();
239 } 243 }
240 244
241 /* 245 /*
@@ -269,6 +273,7 @@ internal class TestStructs
269 t.CallStructSimpleOut(out simple); 273 t.CallStructSimpleOut(out simple);
270 Test.Assert(t.called, "override was not called"); 274 Test.Assert(t.called, "override was not called");
271 Test.AssertEquals("Virtual Struct Out", simple.Fstring); 275 Test.AssertEquals("Virtual Struct Out", simple.Fstring);
276 t.Dispose();
272 } 277 }
273 278
274 /* 279 /*
@@ -297,6 +302,7 @@ internal class TestStructs
297 Dummy.StructSimple simple = t.CallStructSimpleReturn(); 302 Dummy.StructSimple simple = t.CallStructSimpleReturn();
298 Test.Assert(t.called, "override was not called"); 303 Test.Assert(t.called, "override was not called");
299 Test.AssertEquals("Virtual Struct Return", simple.Fstring); 304 Test.AssertEquals("Virtual Struct Return", simple.Fstring);
305 t.Dispose();
300 } 306 }
301 307
302 /* 308 /*
@@ -325,6 +331,7 @@ internal class TestStructs
325 var t = new Dummy.TestObject(); 331 var t = new Dummy.TestObject();
326 bool r = t.StructComplexIn(complex); 332 bool r = t.StructComplexIn(complex);
327 Test.Assert(r, "Function returned false"); 333 Test.Assert(r, "Function returned false");
334 t.Dispose();
328 } 335 }
329 336
330 // public static void complex_ptr_in() 337 // public static void complex_ptr_in()
@@ -342,6 +349,7 @@ internal class TestStructs
342 bool r = t.StructComplexOut(out complex); 349 bool r = t.StructComplexOut(out complex);
343 Test.Assert(r, "Function returned false"); 350 Test.Assert(r, "Function returned false");
344 checkStructComplex(complex); 351 checkStructComplex(complex);
352 t.Dispose();
345 } 353 }
346 354
347 // public static void complex_ptr_out() 355 // public static void complex_ptr_out()
@@ -357,6 +365,7 @@ internal class TestStructs
357 var t = new Dummy.TestObject(); 365 var t = new Dummy.TestObject();
358 var complex = t.StructComplexReturn(); 366 var complex = t.StructComplexReturn();
359 checkStructComplex(complex); 367 checkStructComplex(complex);
368 t.Dispose();
360 } 369 }
361#endif 370#endif
362 // public static void complex_ptr_return() 371 // public static void complex_ptr_return()
diff --git a/src/tests/efl_mono/Value.cs b/src/tests/efl_mono/Value.cs
index ec71e1e..29856d4 100644
--- a/src/tests/efl_mono/Value.cs
+++ b/src/tests/efl_mono/Value.cs
@@ -172,6 +172,8 @@ public static class TestEinaValue {
172 Efl.Object target; 172 Efl.Object target;
173 Test.Assert(v.Get(out target)); 173 Test.Assert(v.Get(out target));
174 Test.AssertEquals(target, obj); 174 Test.AssertEquals(target, obj);
175 target.Dispose();
176 obj.Dispose();
175 } 177 }
176 } 178 }
177 179
@@ -329,6 +331,8 @@ public static class TestEinaValue {
329 Efl.Object received = null; 331 Efl.Object received = null;
330 Test.Assert(a.Get(out received)); 332 Test.Assert(a.Get(out received));
331 Test.AssertEquals(expected, received); 333 Test.AssertEquals(expected, received);
334 received.Dispose();
335 expected.Dispose();
332 } 336 }
333 } 337 }
334 338
@@ -364,6 +368,7 @@ public static class TestEinaValue {
364 368
365 Test.Assert(a.Reset()); 369 Test.Assert(a.Reset());
366 Test.Assert(a.Set(expected)); 370 Test.Assert(a.Set(expected));
371 actual.Dispose();
367 } 372 }
368 } 373 }
369 public static void TestValueOptionalLists() 374 public static void TestValueOptionalLists()
@@ -395,6 +400,7 @@ public static class TestEinaValue {
395 Eina.Value actual = null; 400 Eina.Value actual = null;
396 Test.Assert(a.Get(out actual)); 401 Test.Assert(a.Get(out actual));
397 Test.AssertEquals(expected, actual); 402 Test.AssertEquals(expected, actual);
403 actual.Dispose();
398 } 404 }
399 } 405 }
400 406
@@ -865,6 +871,9 @@ public static class TestEinaValue {
865 871
866 Test.AssertEquals((Efl.Object)array[0], c); 872 Test.AssertEquals((Efl.Object)array[0], c);
867 Test.AssertEquals((Efl.Object)array[1], b); 873 Test.AssertEquals((Efl.Object)array[1], b);
874 c.Dispose();
875 b.Dispose();
876 a.Dispose();
868 } 877 }
869 } 878 }
870 879
@@ -1027,6 +1036,7 @@ public static class TestEinaValue {
1027 int rec_val; 1036 int rec_val;
1028 Test.Assert(v2.Get(out rec_val)); 1037 Test.Assert(v2.Get(out rec_val));
1029 Test.AssertEquals(raw_val, rec_val); 1038 Test.AssertEquals(raw_val, rec_val);
1039 v2.Dispose();
1030 } 1040 }
1031 1041
1032 // FIXME Add remaining list tests 1042 // FIXME Add remaining list tests
@@ -1123,6 +1133,7 @@ public static class TestValueFromObject
1123 Test.Assert(v.Set(newObj)); 1133 Test.Assert(v.Set(newObj));
1124 prop.SetValue(source, v.Unwrap()); 1134 prop.SetValue(source, v.Unwrap());
1125 Test.AssertEquals(prop.GetValue(source), newObj); 1135 Test.AssertEquals(prop.GetValue(source), newObj);
1136 newObj.Dispose();
1126 } 1137 }
1127 } 1138 }
1128 1139
@@ -1163,14 +1174,18 @@ public static class TestValueFromObject
1163 Test.AssertEquals(toCheck[0], 100); 1174 Test.AssertEquals(toCheck[0], 100);
1164 Test.AssertEquals(toCheck[1], 200); 1175 Test.AssertEquals(toCheck[1], 200);
1165 Test.AssertEquals(toCheck[2], 300); 1176 Test.AssertEquals(toCheck[2], 300);
1177 v.Dispose();
1166 } 1178 }
1167 1179
1168 public static void TestObjectContainerFromToObject() 1180 public static void TestObjectContainerFromToObject()
1169 { 1181 {
1170 var initialBag = new Eina.Array<Efl.Object>(); 1182 var initialBag = new Eina.Array<Efl.Object>();
1171 initialBag.Push(new Dummy.TestObject()); 1183 var tmp1 = new Dummy.TestObject();
1172 initialBag.Push(new Dummy.TestObject()); 1184 var tmp2 = new Dummy.TestObject();
1173 initialBag.Push(new Dummy.TestObject()); 1185 var tmp3 = new Dummy.TestObject();
1186 initialBag.Push(tmp1);
1187 initialBag.Push(tmp2);
1188 initialBag.Push(tmp3);
1174 1189
1175 var source = new ComplexHolder { BagOfObjects = initialBag }; 1190 var source = new ComplexHolder { BagOfObjects = initialBag };
1176 var prop = source.GetType().GetProperty("BagOfObjects"); 1191 var prop = source.GetType().GetProperty("BagOfObjects");
@@ -1199,6 +1214,10 @@ public static class TestValueFromObject
1199 Test.AssertEquals(toCheck[0], first); 1214 Test.AssertEquals(toCheck[0], first);
1200 Test.AssertEquals(toCheck[1], second); 1215 Test.AssertEquals(toCheck[1], second);
1201 Test.AssertEquals(toCheck[2], third); 1216 Test.AssertEquals(toCheck[2], third);
1217 tmp3.Dispose();
1218 tmp2.Dispose();
1219 tmp1.Dispose();
1220 v.Dispose();
1202 } 1221 }
1203} 1222}
1204#pragma warning restore 1591 1223#pragma warning restore 1591
diff --git a/src/tests/efl_mono/ValueEolian.cs b/src/tests/efl_mono/ValueEolian.cs
index 305de71..77ec4ac 100644
--- a/src/tests/efl_mono/ValueEolian.cs
+++ b/src/tests/efl_mono/ValueEolian.cs
@@ -38,6 +38,7 @@ public static class TestEinaValueEolian {
38 Test.AssertEquals(v, v_received); 38 Test.AssertEquals(v, v_received);
39 v_received.Dispose(); 39 v_received.Dispose();
40 } 40 }
41 obj.Dispose();
41 } 42 }
42 43
43 public static void TestEolianEinaValueInOwn() 44 public static void TestEolianEinaValueInOwn()
@@ -58,6 +59,7 @@ public static class TestEinaValueEolian {
58 59
59 obj.ClearValue(); 60 obj.ClearValue();
60 } 61 }
62 obj.Dispose();
61 } 63 }
62 64
63 public static void TestEolianEinaValueOut() 65 public static void TestEolianEinaValueOut()
@@ -73,7 +75,9 @@ public static class TestEinaValueEolian {
73 75
74 Test.AssertEquals(v, v_out); 76 Test.AssertEquals(v, v_out);
75 Test.AssertEquals(Eina.Ownership.Unmanaged, v_out.Ownership); 77 Test.AssertEquals(Eina.Ownership.Unmanaged, v_out.Ownership);
78 v_out.Dispose();
76 } 79 }
80 obj.Dispose();
77 } 81 }
78 82
79 public static void TestEolianEinaValueOutOwn() 83 public static void TestEolianEinaValueOutOwn()
@@ -89,7 +93,9 @@ public static class TestEinaValueEolian {
89 93
90 Test.AssertEquals(v, v_out); 94 Test.AssertEquals(v, v_out);
91 Test.AssertEquals(Eina.Ownership.Managed, v_out.Ownership); 95 Test.AssertEquals(Eina.Ownership.Managed, v_out.Ownership);
96 v_out.Dispose();
92 } 97 }
98 obj.Dispose();
93 } 99 }
94