summaryrefslogtreecommitdiff
path: root/src/tests/eo/mixin/mixin_inherit.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-11-08 10:48:55 +0000
committerTom Hacohen <tom@stosb.com>2014-04-10 04:20:19 +0100
commitf4f62e0f9fe3b799ae95bd500ff2c7c1cd01b249 (patch)
treed88305fd35d0dbb956919a671f20e3efdcf9d8ae /src/tests/eo/mixin/mixin_inherit.c
parente4f0e4c410370e0be068812ebbe0392a9a7aac24 (diff)
eo2: migrated mixin test to eo2.
Diffstat (limited to 'src/tests/eo/mixin/mixin_inherit.c')
-rw-r--r--src/tests/eo/mixin/mixin_inherit.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/tests/eo/mixin/mixin_inherit.c b/src/tests/eo/mixin/mixin_inherit.c
index 8f9db135df..7c8b3b568f 100644
--- a/src/tests/eo/mixin/mixin_inherit.c
+++ b/src/tests/eo/mixin/mixin_inherit.c
@@ -9,33 +9,29 @@
9 9
10#define MY_CLASS INHERIT_CLASS 10#define MY_CLASS INHERIT_CLASS
11 11
12static void 12static int
13_a_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) 13_a_get(Eo *obj, void *class_data EINA_UNUSED)
14{ 14{
15 int *name = va_arg(*list, int *); 15 int ret;
16 eo_do_super(obj, MY_CLASS, simple_a_get(name)); 16 eo2_do_super(obj, MY_CLASS, ret = simple_a_get());
17 printf("%s\n", __func__); 17 printf("%s %d\n", __func__, ret);
18}
19
20static void
21_class_constructor(Eo_Class *klass)
22{
23 const Eo_Op_Func_Description func_desc[] = {
24 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
25 EO_OP_FUNC_SENTINEL
26 };
27 18
28 eo_class_funcs_set(klass, func_desc); 19 return ret;
29} 20}
30 21
22static Eo2_Op_Description op_descs[] = {
23 EO2_OP_FUNC_OVERRIDE(_a_get, simple_a_get),
24 EO2_OP_SENTINEL
25};
26
31static const Eo_Class_Description class_desc = { 27static const Eo_Class_Description class_desc = {
32 EO_VERSION, 28 EO2_VERSION,
33 "Inherit", 29 "Inherit",
34 EO_CLASS_TYPE_REGULAR, 30 EO_CLASS_TYPE_REGULAR,
35 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 31 EO2_CLASS_DESCRIPTION_OPS(op_descs),
36 NULL, 32 NULL,
37 0, 33 0,
38 _class_constructor, 34 NULL,
39 NULL 35 NULL
40}; 36};
41 37