--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+
+using EinaTestData;
+using static EinaTestData.BaseData;
+
+namespace TestSuite
+{
+
+class TestInheritance
+{
+ internal class Inherit1 : Dummy.TestObject
+ {
+ override public void IntOut (int x, out int y)
+ {
+ y = 10*x;
+ }
+ }
+
+ internal class Inherit2 : Dummy.TestObject, Dummy.InheritIface
+ {
+ override public void IntOut (int x, out int y)
+ {
+ y = 10*x;
+ }
+
+ public string StringshareTest (string i)
+ {
+ return "Hello World";
+ }
+ }
+
+ public static void test_inherit_from_regular_class()
+ {
+ var obj = new Inherit1();
+ int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj);
+ Test.AssertEquals (50, i);
+ }
+
+ public static void test_inherit_from_iface()
+ {
+ var obj = new Inherit2();
+ int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj);
+ string s = Dummy.InheritHelper.ReceiveDummyAndCallInStringshare(obj);
+ Test.AssertEquals (50, i);
+ Test.AssertEquals ("Hello World", s);
+ }
+}
+
+}
--- /dev/null
+class Dummy.Inherit_Helper extends Efl.Object
+{
+ methods {
+ receive_dummy_and_call_int_out @class {
+ params {
+ @in x: Dummy.Test_Object;
+ }
+ return: int;
+ }
+ receive_dummy_and_call_in_stringshare @class {
+ params {
+ @in x: Dummy.Inherit_Iface;
+ }
+ return: stringshare;
+ }
+ }
+}
--- /dev/null
+interface Dummy.Inherit_Iface {
+ methods {
+ stringshare_test {
+ params {
+ @in v: stringshare;
+ }
+ return: stringshare @owned;
+ }
+ }
+}
#include "dummy_child.eo.h"
#include "dummy_test_iface.eo.h"
#include "dummy_another_iface.eo.h"
+#include "dummy_inherit_iface.eo.h"
+#include "dummy_inherit_helper.eo.h"
#include <interfaces/efl_part.eo.h>
{
} Dummy_Child_Data;
+typedef struct Dummy_Inherit_Helper_Data
+{
+} Dummy_Inherit_Helper_Data;
+
+typedef struct Dummy_Inherit_Iface_Data
+{
+} Dummy_Inherit_Iface_Data;
static
void *_new_int(int v)
(void)klass;
}
+// Inherit
+int _dummy_inherit_helper_receive_dummy_and_call_int_out(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x)
+{
+ int v = 8;
+ dummy_test_object_int_out (x, 5, &v);
+ return v;
+}
+
+const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x)
+{
+ return dummy_inherit_iface_stringshare_test (x, eina_stringshare_add("hello world"));
+}
+
#include "dummy_test_object.eo.c"
#include "dummy_numberwrapper.eo.c"
#include "dummy_child.eo.c"
#include "dummy_test_iface.eo.c"
#include "dummy_another_iface.eo.c"
+#include "dummy_inherit_helper.eo.c"
+#include "dummy_inherit_iface.eo.c"
-eo_files = ['dummy_child.eo', 'dummy_numberwrapper.eo', 'dummy_test_object.eo', 'dummy_test_iface.eo', 'dummy_another_iface.eo']
+eo_files = ['dummy_child.eo', 'dummy_numberwrapper.eo', 'dummy_test_object.eo', 'dummy_test_iface.eo', 'dummy_another_iface.eo', 'dummy_inherit_helper.eo', 'dummy_inherit_iface.eo']
eo_file_targets = []
'Strings.cs',
'Structs.cs',
'Value.cs',
- 'ValueEolian.cs'
+ 'ValueEolian.cs',
+ 'Inheritance.cs',
]
efl_mono_suite = executable('efl-mono-suite',