From: Daniel Kolesa Date: Fri, 8 May 2015 13:12:27 +0000 (+0100) Subject: eolian: is_beta API plus tests X-Git-Tag: v1.15.0-alpha1~652 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c07b9bea41e7d49d0477b80d19f31ea9264ada6;p=platform%2Fupstream%2Fefl.git eolian: is_beta API plus tests --- diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index c2e07c5..6223000 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -884,6 +884,16 @@ EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); EAPI Eina_Bool eolian_function_is_c_only(const Eolian_Function *function_id); /* + * @brief Get whether a function is beta. + * + * @param[in] function_id Id of the function + * @return EINA_TRUE and EINA_FALSE respectively + * + * @ingroup Eolian + */ +EAPI Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id); + +/* * @brief Indicates if a function is a constructing function of a given class. * * @param[in] klass the class diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c index fd78fef..d29b9d4 100644 --- a/src/lib/eolian/database_function_api.c +++ b/src/lib/eolian/database_function_api.c @@ -264,6 +264,13 @@ eolian_function_is_c_only(const Eolian_Function *fid) return fid->is_c_only; } +EAPI Eina_Bool +eolian_function_is_beta(const Eolian_Function *fid) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); + return fid->is_beta; +} + EAPI Eina_Bool eolian_function_is_implemented( const Eolian_Function *function_id, Eolian_Function_Type func_type, const Eolian_Class *klass) diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo index d4b4fc8..adbbbbc 100644 --- a/src/tests/eolian/data/class_simple.eo +++ b/src/tests/eolian/data/class_simple.eo @@ -4,7 +4,7 @@ class Class_Simple { eo_prefix: evas_obj_simple; data: Evas_Simple_Data; methods { - @property a { + @property a @beta { /*@ Common desc for a */ set { /*@ @@ -22,7 +22,7 @@ class Class_Simple { eo: null; } } - foo { + foo @beta { /*@ comment foo */ params { @in int a; /*@ a */ diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 8269c2c..e9d35d2 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -565,6 +565,7 @@ START_TEST(eolian_simple_parsing) /* Property */ fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY))); fail_if(strcmp(eolian_function_name_get(fid), "a")); + fail_if(!eolian_function_is_beta(fid)); string = eolian_function_description_get(fid, EOLIAN_PROPERTY); fail_if(!string); fail_if(strcmp(string, "Common desc for a")); @@ -611,9 +612,11 @@ START_TEST(eolian_simple_parsing) fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET)); fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET)); fail_if(!eolian_function_is_c_only(fid)); + fail_if(eolian_function_is_beta(fid)); /* Method */ fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); + fail_if(!eolian_function_is_beta(fid)); string = eolian_function_description_get(fid, EOLIAN_METHOD); fail_if(!string); fail_if(strcmp(string, "comment foo")); @@ -663,6 +666,7 @@ START_TEST(eolian_simple_parsing) fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD))); fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD)); fail_if(!eolian_function_is_c_only(fid)); + fail_if(eolian_function_is_beta(fid)); eolian_shutdown(); }