summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/Eo.cs
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-05-31 17:34:59 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-05-31 17:41:14 -0300
commit937da0b12c5b2b07a173199078856c35becdb0e0 (patch)
tree78d05f2bc299be847ab790db6ec2bbcd88ce363d /src/tests/efl_mono/Eo.cs
parent37941b757d75dc4847c081197e16689b5fe8eb1f (diff)
csharp: Add some tests
Summary: - Wrappers losing C# ref while alive in Eo - Inherited instances being collected Also cleanup GC and loop queue before each test Reviewers: vitor.sousa Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9063
Diffstat (limited to 'src/tests/efl_mono/Eo.cs')
-rw-r--r--src/tests/efl_mono/Eo.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index e77fd7bbc7..95b6b6395e 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -110,6 +110,20 @@ class TestEoInherit
110 Efl.Object loop = new MyObject(); 110 Efl.Object loop = new MyObject();
111 Test.Assert(loop.NativeHandle != System.IntPtr.Zero); 111 Test.Assert(loop.NativeHandle != System.IntPtr.Zero);
112 } 112 }
113
114 private static WeakReference CreateCollectableInherited()
115 {
116 var obj = new MyObject();
117 return new WeakReference(obj);
118 }
119
120 public static void inherited_collected()
121 {
122 var wref = CreateCollectableInherited();
123 Test.CollectAndIterate();
124
125 Test.AssertNull(wref.Target);
126 }
113} 127}
114 128
115class TestEoNames 129class TestEoNames