From 7e95079f0fb8affae694d2855c01fbaec35e0806 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Wed, 27 Aug 2014 15:19:50 +0100 Subject: [PATCH] eolian: fix tests --- src/tests/eolian/data/object_impl_ref.c | 25 ++++++++++++------------- src/tests/eolian/eolian_parsing.c | 9 ++++++--- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/tests/eolian/data/object_impl_ref.c b/src/tests/eolian/data/object_impl_ref.c index 0f1a87efb5..a3f1bcb145 100644 --- a/src/tests/eolian/data/object_impl_ref.c +++ b/src/tests/eolian/data/object_impl_ref.c @@ -25,6 +25,18 @@ _object_impl_b_set(Eo *obj, Object_Impl_Data *pd, Eina_List *value) } +EOLIAN static void +_object_impl_constructor_1(Eo *obj, Object_Impl_Data *pd, int a, char b) +{ + +} + +EOLIAN static void +_object_impl_constructor_2(Eo *obj, Object_Impl_Data *pd) +{ + +} + EOLIAN static char * _object_impl_foo1(Eo *obj, Object_Impl_Data *pd, int a, char *b, double *c) { @@ -37,22 +49,9 @@ _object_impl_foo2(const Eo *obj, Object_Impl_Data *pd, int a, const char *b) } -EOLIAN static void -_object_impl_constructor_1(Eo *obj, Object_Impl_Data *pd, int a, char b) -{ - -} - -EOLIAN static void -_object_impl_constructor_2(Eo *obj, Object_Impl_Data *pd) -{ - -} - EOLIAN static void _object_impl_base_constructor(Eo *obj, Object_Impl_Data *pd) { - eo_do_super(obj, OBJECT_IMPL_CLASS, base_constructor()); } diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 8e5ba2eb38..a90395a8ba 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -237,10 +237,13 @@ START_TEST(eolian_ctor_dtor) eina_iterator_free(iter); /* Custom ctors/dtors */ - fail_if(!eolian_class_function_get_by_name(base, "constructor", EOLIAN_CTOR)); + fail_if(!(impl_func = eolian_class_function_get_by_name(base, "constructor", EOLIAN_METHOD))); + fail_if(!eolian_function_is_constructing(impl_func)); fail_if(!eolian_class_function_get_by_name(base, "destructor", EOLIAN_METHOD)); - fail_if(!eolian_class_function_get_by_name(class, "custom_constructor_1", EOLIAN_CTOR)); - fail_if(!eolian_class_function_get_by_name(class, "custom_constructor_2", EOLIAN_CTOR)); + fail_if(!(impl_func = eolian_class_function_get_by_name(class, "custom_constructor_1", EOLIAN_METHOD))); + fail_if(!eolian_function_is_constructing(impl_func)); + fail_if(!(impl_func = eolian_class_function_get_by_name(class, "custom_constructor_2", EOLIAN_METHOD))); + fail_if(!eolian_function_is_constructing(impl_func)); eolian_shutdown(); }