summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-08-23 14:00:26 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-08-23 14:07:09 -0300
commit1aa05ab41be00da32fcc3cc83a95c605dbeb9a58 (patch)
treefb46f24e81ef1f8f0f9b129c768e9a39df2bb02d /src/tests/efl_mono
parent8aae656b8003f3f3cf4dd0dbed9aae92eee521ef (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/efl_mono')
-rw-r--r--src/tests/efl_mono/Eo.cs8
-rw-r--r--src/tests/efl_mono/dummy_test_object.c14
-rw-r--r--src/tests/efl_mono/dummy_test_object.eo9
3 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index aa3565d..56813b3 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
353class TestEoGrandChildrenFinalize 361class TestEoGrandChildrenFinalize
diff --git a/src/tests/efl_mono/dummy_test_object.c b/src/tests/efl_mono/dummy_test_object.c
index 8ba7536..6c32f80 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
4575void _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
4581void _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 */
4574static int _dummy_test_object_klass_prop = 0; 4588static 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 b6841db..2e5cbfc 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 {}