diff options
author | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2019-08-23 14:00:26 -0300 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2019-08-23 14:07:09 -0300 |
commit | 1aa05ab41be00da32fcc3cc83a95c605dbeb9a58 (patch) | |
tree | fb46f24e81ef1f8f0f9b129c768e9a39df2bb02d /src/tests | |
parent | 8aae656b8003f3f3cf4dd0dbed9aae92eee521ef (diff) |
eolian-mono: Add support for multi-value properties with tuples
Summary: T8133
Reviewers: woohyun, segfaultxavi, felipealmeida
Reviewed By: felipealmeida
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9577
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/efl_mono/Eo.cs | 8 | ||||
-rw-r--r-- | src/tests/efl_mono/dummy_test_object.c | 14 | ||||
-rw-r--r-- | src/tests/efl_mono/dummy_test_object.eo | 9 |
3 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs index aa3565dd76..56813b3f87 100644 --- a/src/tests/efl_mono/Eo.cs +++ b/src/tests/efl_mono/Eo.cs | |||
@@ -348,6 +348,14 @@ class TestCsharpProperties | |||
348 | iface.IfaceProp = val; | 348 | iface.IfaceProp = val; |
349 | Test.AssertEquals(val, iface.IfaceProp); | 349 | Test.AssertEquals(val, iface.IfaceProp); |
350 | } | 350 | } |
351 | |||
352 | public static void test_csharp_multi_valued_prop() | ||
353 | { | ||
354 | var obj = new Dummy.TestObject(); | ||
355 | obj.MultiValuedProp = (1, 2); | ||
356 | var ret = obj.MultiValuedProp; | ||
357 | Test.AssertEquals(ret, (1, 2)); | ||
358 | } | ||
351 | } | 359 | } |
352 | 360 | ||
353 | class TestEoGrandChildrenFinalize | 361 | class TestEoGrandChildrenFinalize |
diff --git a/src/tests/efl_mono/dummy_test_object.c b/src/tests/efl_mono/dummy_test_object.c index 8ba7536720..6c32f80ca1 100644 --- a/src/tests/efl_mono/dummy_test_object.c +++ b/src/tests/efl_mono/dummy_test_object.c | |||
@@ -16,6 +16,8 @@ typedef struct Dummy_Test_Object_Data | |||
16 | int iface_prop; | 16 | int iface_prop; |
17 | Eo *provider; | 17 | Eo *provider; |
18 | Eo *iface_provider; | 18 | Eo *iface_provider; |
19 | int prop1; | ||
20 | int prop2; | ||
19 | 21 | ||
20 | // Containers passed to C# as iterator/accessors | 22 | // Containers passed to C# as iterator/accessors |
21 | Eina_Array *out_array; | 23 | Eina_Array *out_array; |
@@ -4570,6 +4572,18 @@ Dummy_MyInt _dummy_test_object_bypass_typedef(EINA_UNUSED Eo *obj, EINA_UNUSED D | |||
4570 | return data; | 4572 | return data; |
4571 | } | 4573 | } |
4572 | 4574 | ||
4575 | void _dummy_test_object_multi_valued_prop_get(Eo const* obj EINA_UNUSED, Dummy_Test_Object_Data* pd, int* prop1, int* prop2) | ||
4576 | { | ||
4577 | *prop1 = pd->prop1; | ||
4578 | *prop2 = pd->prop2; | ||
4579 | } | ||
4580 | |||
4581 | void _dummy_test_object_multi_valued_prop_set(Eo* obj EINA_UNUSED, Dummy_Test_Object_Data* pd, int prop1, int prop2) | ||
4582 | { | ||
4583 | pd->prop1 = prop1; | ||
4584 | pd->prop2 = prop2; | ||
4585 | } | ||
4586 | |||
4573 | /* Class Properties */ | 4587 | /* Class Properties */ |
4574 | static int _dummy_test_object_klass_prop = 0; | 4588 | static int _dummy_test_object_klass_prop = 0; |
4575 | 4589 | ||
diff --git a/src/tests/efl_mono/dummy_test_object.eo b/src/tests/efl_mono/dummy_test_object.eo index b6841db788..2e5cbfc384 100644 --- a/src/tests/efl_mono/dummy_test_object.eo +++ b/src/tests/efl_mono/dummy_test_object.eo | |||
@@ -1569,6 +1569,15 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { | |||
1569 | return: Dummy.MyInt; | 1569 | return: Dummy.MyInt; |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | @property multi_valued_prop { | ||
1573 | get {} | ||
1574 | set {} | ||
1575 | values { | ||
1576 | prop1: int; | ||
1577 | prop2: int; | ||
1578 | } | ||
1579 | } | ||
1580 | |||
1572 | @property klass_prop @static { | 1581 | @property klass_prop @static { |
1573 | get {} | 1582 | get {} |
1574 | set {} | 1583 | set {} |