summaryrefslogtreecommitdiff
path: root/src/tests/eolian/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eolian/data')
-rw-r--r--src/tests/eolian/data/base.eo9
-rw-r--r--src/tests/eolian/data/class_simple_ref.c5
-rw-r--r--src/tests/eolian/data/override.eo28
-rw-r--r--src/tests/eolian/data/override_ref.c82
4 files changed, 121 insertions, 3 deletions
diff --git a/src/tests/eolian/data/base.eo b/src/tests/eolian/data/base.eo
index 59560142c8..3b701b5b06 100644
--- a/src/tests/eolian/data/base.eo
+++ b/src/tests/eolian/data/base.eo
@@ -1,4 +1,13 @@
class Base {
+ properties {
+ z {
+ values {
+ int a;
+ char b;
+ float c;
+ }
+ }
+ }
methods {
constructor {
}
diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c
index 51a4f4ad63..a7b868d31b 100644
--- a/src/tests/eolian/data/class_simple_ref.c
+++ b/src/tests/eolian/data/class_simple_ref.c
@@ -15,9 +15,8 @@ char * _class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *
static char * __eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c)
{
- if (c) *c = 1337.600000;
-
- return _class_simple_foo(obj, pd, a, b, c);
+ if (c) *c = 1337.600000;
+ return _class_simple_foo(obj, pd, a, b, c);
}
EOAPI EO_FUNC_BODYV(evas_obj_simple_foo, char *, NULL, EO_FUNC_CALL(a, b, c), int a, char *b, double *c);
diff --git a/src/tests/eolian/data/override.eo b/src/tests/eolian/data/override.eo
index c728b97940..4eb347774f 100644
--- a/src/tests/eolian/data/override.eo
+++ b/src/tests/eolian/data/override.eo
@@ -11,12 +11,37 @@ class Override (Base) {
}
get {
}
+ keys {
+ int idx;
+ }
+ values {
+ float a;
+ char b;
+ int c;
+ }
+ }
+ c {
+ set {
+ }
+ get {
+ }
+ keys {
+ int idx;
+ }
+ values {
+ int c(50);
+ }
}
}
methods {
foo {
}
bar {
+ params {
+ @in int idx;
+ @out int a (250);
+ @out char *str (null);
+ }
}
}
implements {
@@ -25,5 +50,8 @@ class Override (Base) {
@virtual .foo;
@auto .b.set;
@empty .bar;
+ @auto .c.get;
+ @auto Base.z.get;
+ @empty Base.z.set;
}
}
diff --git a/src/tests/eolian/data/override_ref.c b/src/tests/eolian/data/override_ref.c
new file mode 100644
index 0000000000..103536af80
--- /dev/null
+++ b/src/tests/eolian/data/override_ref.c
@@ -0,0 +1,82 @@
+EOAPI EO_VOID_FUNC_BODY(override_a_set);
+EOAPI EO_VOID_FUNC_BODY(override_foo);
+
+static void __eolian_override_b_set(Eo *obj EINA_UNUSED, Override_Data *pd, int idx EINA_UNUSED, float a, char b, int c)
+{
+ a = pd->a;
+ b = pd->b;
+ c = pd->c;
+}
+
+EOAPI EO_VOID_FUNC_BODYV(override_b_set, EO_FUNC_CALL(idx, a, b, c), int idx, float a, char b, int c);
+
+static void __eolian_override_bar(Eo *obj EINA_UNUSED, Override_Data *pd EINA_UNUSED, int idx EINA_UNUSED, int *a, char **str)
+{
+ if (a) *a = 250;
+ if (str) *str = NULL;
+}
+
+EOAPI EO_VOID_FUNC_BODYV(override_bar, EO_FUNC_CALL(idx, a, str), int idx, int *a, char **str);
+
+static int __eolian_override_c_get(Eo *obj EINA_UNUSED, Override_Data *pd EINA_UNUSED, int idx EINA_UNUSED)
+{
+ return 50;
+}
+
+EOAPI EO_FUNC_BODYV(override_c_get, int, 50, EO_FUNC_CALL(idx), int idx);
+
+void _override_a_get(Eo *obj, Override_Data *pd);
+
+EOAPI EO_VOID_FUNC_BODY(override_a_get);
+
+void _override_b_get(Eo *obj, Override_Data *pd, int idx, float *a, char *b, int *c);
+
+EOAPI EO_VOID_FUNC_BODYV(override_b_get, EO_FUNC_CALL(idx, a, b, c), int idx, float *a, char *b, int *c);
+
+void _override_c_set(Eo *obj, Override_Data *pd, int idx, int c);
+
+EOAPI EO_VOID_FUNC_BODYV(override_c_set, EO_FUNC_CALL(idx, c), int idx, int c);
+
+void _override_base_constructor(Eo *obj, Override_Data *pd);
+
+
+static void __eolian_override_base_z_get(Eo *obj EINA_UNUSED, Override_Data *pd, int *a, char *b, float *c)
+{
+ if (a) *a = pd->a;
+ if (b) *b = pd->b;
+ if (c) *c = pd->c;
+}
+
+
+static void __eolian_override_base_z_set(Eo *obj EINA_UNUSED, Override_Data *pd EINA_UNUSED, int a EINA_UNUSED, char b EINA_UNUSED, float c EINA_UNUSED)
+{
+}
+
+
+static Eo_Op_Description _override_op_desc[] = {
+ EO_OP_FUNC_OVERRIDE(base_constructor, _override_base_constructor),
+ EO_OP_FUNC_OVERRIDE(base_z_get, __eolian_override_base_z_get),
+ EO_OP_FUNC_OVERRIDE(base_z_set, __eolian_override_base_z_set),
+ EO_OP_FUNC(override_a_set, NULL, ""),
+ EO_OP_FUNC(override_foo, NULL, ""),
+ EO_OP_FUNC(override_b_set, __eolian_override_b_set, ""),
+ EO_OP_FUNC(override_bar, __eolian_override_bar, ""),
+ EO_OP_FUNC(override_c_get, __eolian_override_c_get, ""),
+ EO_OP_FUNC(override_a_get, _override_a_get, ""),
+ EO_OP_FUNC(override_b_get, _override_b_get, ""),
+ EO_OP_FUNC(override_c_set, _override_c_set, ""),
+ EO_OP_SENTINEL
+};
+
+static const Eo_Class_Description _override_class_desc = {
+ EO_VERSION,
+ "Override",
+ EO_CLASS_TYPE_REGULAR,
+ EO_CLASS_DESCRIPTION_OPS(_override_op_desc),
+ NULL,
+ sizeof(Override_Data),
+ NULL,
+ NULL
+};
+
+EO_DEFINE_CLASS(override_class_get, &_override_class_desc, BASE_CLASS, NULL); \ No newline at end of file