summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-07 14:59:36 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-07 15:26:09 +0100
commit1637c21a768ee5a914236d4979a700c3be007295 (patch)
tree162e02c31d6bab80a1b114575bf81ed73af43494 /src/tests
parent96f6ca336d92ed7d564664e2e84e44f6a5a156c5 (diff)
eolian: support @ref on returns
This adds basic support for @ref on return types.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eolian/data/class_simple.eo2
-rw-r--r--src/tests/eolian/data/class_simple_ref.c4
-rw-r--r--src/tests/eolian/data/class_simple_ref_eo.h2
-rw-r--r--src/tests/eolian/data/class_simple_ref_legacy.h2
-rw-r--r--src/tests/eolian/eolian_parsing.c2
5 files changed, 7 insertions, 5 deletions
diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo
index 62a1f3358e..4bae98ab47 100644
--- a/src/tests/eolian/data/class_simple.eo
+++ b/src/tests/eolian/data/class_simple.eo
@@ -36,7 +36,7 @@ class Class_Simple {
36 params { 36 params {
37 x: int; 37 x: int;
38 } 38 }
39 return: int; 39 return: int @ref;
40 } 40 }
41 } 41 }
42} 42}
diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c
index b71ebb4a6d..5bcbd33e0c 100644
--- a/src/tests/eolian/data/class_simple_ref.c
+++ b/src/tests/eolian/data/class_simple_ref.c
@@ -21,9 +21,9 @@ static char * __eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, ch
21 21
22EOAPI EO_FUNC_BODYV(evas_obj_simple_foo, char *, NULL, EO_FUNC_CALL(a, b, c, d), int a, char *b, double *c, int *d); 22EOAPI EO_FUNC_BODYV(evas_obj_simple_foo, char *, NULL, EO_FUNC_CALL(a, b, c, d), int a, char *b, double *c, int *d);
23 23
24int _class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x); 24int * _class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x);
25 25
26EOAPI EO_FUNC_BODYV(evas_obj_simple_bar, int, 0, EO_FUNC_CALL(x), int x); 26EOAPI EO_FUNC_BODYV(evas_obj_simple_bar, int *, 0, EO_FUNC_CALL(x), int x);
27 27
28static const Eo_Op_Description _class_simple_op_desc[] = { 28static const Eo_Op_Description _class_simple_op_desc[] = {
29 EO_OP_FUNC(evas_obj_simple_a_set, _class_simple_a_set), 29 EO_OP_FUNC(evas_obj_simple_a_set, _class_simple_a_set),
diff --git a/src/tests/eolian/data/class_simple_ref_eo.h b/src/tests/eolian/data/class_simple_ref_eo.h
index 754349109b..9c66d574c8 100644
--- a/src/tests/eolian/data/class_simple_ref_eo.h
+++ b/src/tests/eolian/data/class_simple_ref_eo.h
@@ -64,7 +64,7 @@ EOAPI void evas_obj_simple_b_set(Eo *obj);
64EOAPI char *evas_obj_simple_foo(Eo *obj, int a, char *b, double *c, int *d); 64EOAPI char *evas_obj_simple_foo(Eo *obj, int a, char *b, double *c, int *d);
65#endif 65#endif
66 66
67EOAPI int evas_obj_simple_bar(Eo *obj, int x); 67EOAPI int *evas_obj_simple_bar(Eo *obj, int x);
68 68
69 69
70#endif 70#endif
diff --git a/src/tests/eolian/data/class_simple_ref_legacy.h b/src/tests/eolian/data/class_simple_ref_legacy.h
index 8664dbf9da..2150692000 100644
--- a/src/tests/eolian/data/class_simple_ref_legacy.h
+++ b/src/tests/eolian/data/class_simple_ref_legacy.h
@@ -53,6 +53,6 @@ EAPI void evas_object_simple_b_set(Class_Simple *obj);
53 * @ingroup Class_Simple 53 * @ingroup Class_Simple
54 */ 54 */
55EAPI char *evas_object_simple_foo(Class_Simple *obj, int a, char *b, double *c, int *d); 55EAPI char *evas_object_simple_foo(Class_Simple *obj, int a, char *b, double *c, int *d);
56EAPI int evas_object_simple_bar(Class_Simple *obj, int x); 56EAPI int *evas_object_simple_bar(Class_Simple *obj, int x);
57 57
58#endif 58#endif
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 66f4b87197..86ff77f151 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -606,6 +606,7 @@ START_TEST(eolian_simple_parsing)
606 /* Method */ 606 /* Method */
607 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); 607 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
608 fail_if(!eolian_function_is_beta(fid)); 608 fail_if(!eolian_function_is_beta(fid));
609 fail_if(eolian_function_return_is_ref(fid, EOLIAN_METHOD));
609 /* Function return */ 610 /* Function return */
610 tp = eolian_function_return_type_get(fid, EOLIAN_METHOD); 611 tp = eolian_function_return_type_get(fid, EOLIAN_METHOD);
611 fail_if(!tp); 612 fail_if(!tp);
@@ -651,6 +652,7 @@ START_TEST(eolian_simple_parsing)
651 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD)); 652 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
652 fail_if(!eolian_function_is_c_only(fid)); 653 fail_if(!eolian_function_is_c_only(fid));
653 fail_if(eolian_function_is_beta(fid)); 654 fail_if(eolian_function_is_beta(fid));
655 fail_if(!eolian_function_return_is_ref(fid, EOLIAN_METHOD));
654 656
655 eolian_shutdown(); 657 eolian_shutdown();
656} 658}