summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/Eo.cs
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-05-10 22:00:07 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-05-11 11:01:59 -0300
commitda6f5932f1ec0392d23d84907863271810d90567 (patch)
tree2dcf9729be38d78b2bacfa811072c7fbc5d161a1 /src/tests/efl_mono/Eo.cs
parent95e3468aeee915c4b429066f14c39f2a0715f571 (diff)
efl_mono: Support type aliases.
Summary: Due to the absence of typedef from C#, we generate thin structs with implicit operators to allow reference the data from their typedef'd name from C#. The other alternatives would be always converting to the lowest base on the alias stack (losing the meaningfulness of the typedef name) or using the 'using' directive. The latter has the restriction that it makes an alias visible only in the file they are declared. Reviewers: felipealmeida, cedric, segfaultxavi Reviewed By: segfaultxavi Subscribers: zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6157
Diffstat (limited to 'src/tests/efl_mono/Eo.cs')
-rw-r--r--src/tests/efl_mono/Eo.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index c78027b5c6..db89fb8c4f 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -208,4 +208,20 @@ class TestKlassMethods
208 } 208 }
209} 209}
210 210
211class TestTypedefs
212{
213 public static void basic_typedef_test()
214 {
215 test.ITesting obj = new test.Testing();
216 test.MyInt input = 1900;
217 test.MyInt receiver;
218
219 int ret = obj.BypassTypedef(input, out receiver);
220
221 Test.AssertEquals((test.MyInt)ret, input);
222 Test.AssertEquals(receiver, input);
223
224 }
225}
226
211} 227}