eolian: eolian_function_is_c_only tests

This commit is contained in:
Daniel Kolesa 2014-12-03 15:04:40 +00:00
parent 49aebd063e
commit d24220221a
2 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,7 @@ class Class_Simple {
int value (100); /*@ Value description */
}
}
b {
b @c_only {
set {
eo: null;
}
@ -33,7 +33,7 @@ class Class_Simple {
}
return: char * (null); /*@ comment for method return */
}
bar {
bar @c_only {
eo: null;
params {
int x;

View File

@ -590,10 +590,11 @@ START_TEST(eolian_simple_parsing)
fail_if(v.type != EOLIAN_EXPR_INT);
fail_if(v.value.i != 100);
/* legacy only */
/* legacy only + c only */
fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
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));
/* Method */
fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
@ -642,9 +643,10 @@ START_TEST(eolian_simple_parsing)
fail_if(eina_iterator_next(iter, &dummy));
eina_iterator_free(iter);
/* legacy only */
/* legacy only + c only */
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));
eolian_shutdown();
}