summaryrefslogtreecommitdiff
path: root/src/tests/eolian/eolian_parsing.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-09 16:54:43 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-06-09 16:55:24 +0100
commit375179b47fa62dba2a1168d1e4e6a7ab877f7414 (patch)
treed3cc6c60efc27c8fd78105c8bda84028fb2974b5 /src/tests/eolian/eolian_parsing.c
parent7953da836ecf9ae2d8c32566c762ca3432ae8aea (diff)
eolian: support @protected for accessors (get/set)
Previously it was only possible to set it for the whole property. @feature
Diffstat (limited to '')
-rw-r--r--src/tests/eolian/eolian_parsing.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 9833db3597..33befe1890 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -516,19 +516,20 @@ START_TEST(eolian_scope)
516 516
517 /* Property scope */ 517 /* Property scope */
518 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY))); 518 fail_if(!(fid = eolian_class_function_get_by_name(class, "a", EOLIAN_PROPERTY)));
519 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PROTECTED); 519 fail_if(eolian_function_scope_get(fid, EOLIAN_PROPERTY) != EOLIAN_SCOPE_PROTECTED);
520 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY))); 520 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
521 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC); 521 fail_if(eolian_function_scope_get(fid, EOLIAN_PROPERTY) != EOLIAN_SCOPE_PUBLIC);
522 fail_if(!(fid = eolian_class_function_get_by_name(class, "c", EOLIAN_PROPERTY))); 522 fail_if(!(fid = eolian_class_function_get_by_name(class, "c", EOLIAN_PROPERTY)));
523 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC); 523 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PUBLIC);
524 fail_if(eolian_function_scope_get(fid, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PROTECTED);
524 525
525 /* Method scope */ 526 /* Method scope */
526 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); 527 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
527 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC); 528 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PUBLIC);
528 fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD))); 529 fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD)));
529 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PROTECTED); 530 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PROTECTED);
530 fail_if(!(fid = eolian_class_function_get_by_name(class, "foobar", EOLIAN_METHOD))); 531 fail_if(!(fid = eolian_class_function_get_by_name(class, "foobar", EOLIAN_METHOD)));
531 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC); 532 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PUBLIC);
532 533
533 eolian_shutdown(); 534 eolian_shutdown();
534} 535}
@@ -946,16 +947,16 @@ START_TEST(eolian_class_funcs)
946 /* Class methods */ 947 /* Class methods */
947 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); 948 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
948 fail_if(!eolian_function_is_class(fid)); 949 fail_if(!eolian_function_is_class(fid));
949 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC); 950 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PUBLIC);
950 fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD))); 951 fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD)));
951 fail_if(eolian_function_is_class(fid)); 952 fail_if(eolian_function_is_class(fid));
952 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PUBLIC); 953 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PUBLIC);
953 fail_if(!(fid = eolian_class_function_get_by_name(class, "baz", EOLIAN_METHOD))); 954 fail_if(!(fid = eolian_class_function_get_by_name(class, "baz", EOLIAN_METHOD)));
954 fail_if(!eolian_function_is_class(fid)); 955 fail_if(!eolian_function_is_class(fid));
955 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PROTECTED); 956 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PROTECTED);
956 fail_if(!(fid = eolian_class_function_get_by_name(class, "bah", EOLIAN_METHOD))); 957 fail_if(!(fid = eolian_class_function_get_by_name(class, "bah", EOLIAN_METHOD)));
957 fail_if(eolian_function_is_class(fid)); 958 fail_if(eolian_function_is_class(fid));
958 fail_if(eolian_function_scope_get(fid) != EOLIAN_SCOPE_PROTECTED); 959 fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PROTECTED);
959 960
960 eolian_shutdown(); 961 eolian_shutdown();
961} 962}