csharp: Add test for static interface members
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Tue, 10 Sep 2019 23:15:59 +0000 (20:15 -0300)
committerYeongjong Lee <yj34.lee@samsung.com>
Mon, 16 Sep 2019 01:23:00 +0000 (10:23 +0900)
For the checks added in D9893

src/tests/efl_mono/Eo.cs
src/tests/efl_mono/dummy_interfaces.c
src/tests/efl_mono/dummy_test_iface.eo

index efb1faa..adfec9e 100644 (file)
@@ -607,4 +607,18 @@ class TestProtectedInterfaceMembers
     }
 }
 
+class TestStaticInterfaceMembers
+{
+    public static void test_interface_static_member()
+    {
+        var iface = typeof(Dummy.ITestIface);
+        var properties = iface.GetProperties(BindingFlags.Public | BindingFlags.Instance);
+        Test.AssertNull(properties.SingleOrDefault(p => p.Name == "StaticProp"));
+
+        var implementation = typeof(Dummy.TestObject);
+        properties = implementation.GetProperties(BindingFlags.Public | BindingFlags.Static);
+        Test.AssertNotNull(properties.SingleOrDefault(p => p.Name == "StaticProp"));
+    }
+}
+
 }
index c60ec59..37b5509 100644 (file)
@@ -3,5 +3,14 @@
 
 #include "libefl_mono_native_test.h"
 
+void _dummy_test_iface_static_prop_set(int data EINA_UNUSED)
+{
+}
+
+int _dummy_test_iface_static_prop_get()
+{
+    return -1;
+}
+
 #include "dummy_test_iface.eo.c"
 #include "dummy_inherit_iface.eo.c"
index 068b135..a8dd405 100644 (file)
@@ -41,6 +41,14 @@ interface Dummy.Test_Iface
          }
       }
 
+      @property static_prop @static {
+         get {}
+         set {}
+         values {
+            data: int;
+         }
+      }
+
    }
    events {
       nonconflicted: void;