summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-10 20:15:59 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-10 20:17:28 -0300
commit09c3517d57f4ba34c662d93e101c494e5a839480 (patch)
treed329466da1c653e43b2c7a53903e11dbda22a548 /src/tests/efl_mono
parent4bacfe155f9161d09b19a81bb38080d2d53cd5bd (diff)
csharp: Add test for static interface members
For the checks added in D9893
Diffstat (limited to 'src/tests/efl_mono')
-rw-r--r--src/tests/efl_mono/Eo.cs14
-rw-r--r--src/tests/efl_mono/dummy_interfaces.c9
-rw-r--r--src/tests/efl_mono/dummy_test_iface.eo8
3 files changed, 31 insertions, 0 deletions
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index efb1faa..adfec9e 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -607,4 +607,18 @@ class TestProtectedInterfaceMembers
607 } 607 }
608} 608}
609 609
610class TestStaticInterfaceMembers
611{
612 public static void test_interface_static_member()
613 {
614 var iface = typeof(Dummy.ITestIface);
615 var properties = iface.GetProperties(BindingFlags.Public | BindingFlags.Instance);
616 Test.AssertNull(properties.SingleOrDefault(p => p.Name == "StaticProp"));
617
618 var implementation = typeof(Dummy.TestObject);
619 properties = implementation.GetProperties(BindingFlags.Public | BindingFlags.Static);
620 Test.AssertNotNull(properties.SingleOrDefault(p => p.Name == "StaticProp"));
621 }
622}
623
610} 624}
diff --git a/src/tests/efl_mono/dummy_interfaces.c b/src/tests/efl_mono/dummy_interfaces.c
index c60ec59..37b5509 100644
--- a/src/tests/efl_mono/dummy_interfaces.c
+++ b/src/tests/efl_mono/dummy_interfaces.c
@@ -3,5 +3,14 @@
3 3
4#include "libefl_mono_native_test.h" 4#include "libefl_mono_native_test.h"
5 5
6void _dummy_test_iface_static_prop_set(int data EINA_UNUSED)
7{
8}
9
10int _dummy_test_iface_static_prop_get()
11{
12 return -1;
13}
14
6#include "dummy_test_iface.eo.c" 15#include "dummy_test_iface.eo.c"
7#include "dummy_inherit_iface.eo.c" 16#include "dummy_inherit_iface.eo.c"
diff --git a/src/tests/efl_mono/dummy_test_iface.eo b/src/tests/efl_mono/dummy_test_iface.eo
index 068b135..a8dd405 100644
--- a/src/tests/efl_mono/dummy_test_iface.eo
+++ b/src/tests/efl_mono/dummy_test_iface.eo
@@ -41,6 +41,14 @@ interface Dummy.Test_Iface
41 } 41 }
42 } 42 }
43 43
44 @property static_prop @static {
45 get {}
46 set {}
47 values {
48 data: int;
49 }
50 }
51
44 } 52 }
45 events { 53 events {
46 nonconflicted: void; 54 nonconflicted: void;