summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-12-03 15:04:40 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2014-12-03 15:04:40 +0000
commitd24220221ae147d83d7216de0fd42d935e9f0296 (patch)
treecd6fd5aed9f5057a70232aceb35eff54bd266dac
parent49aebd063e9a9bebac9ff5d7a9e3ecf7a70712cd (diff)
eolian: eolian_function_is_c_only tests
-rw-r--r--src/tests/eolian/data/class_simple.eo4
-rw-r--r--src/tests/eolian/eolian_parsing.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo
index 1f0ae65..29d95b7 100644
--- a/src/tests/eolian/data/class_simple.eo
+++ b/src/tests/eolian/data/class_simple.eo
@@ -17,7 +17,7 @@ class Class_Simple {
17 int value (100); /*@ Value description */ 17 int value (100); /*@ Value description */
18 } 18 }
19 } 19 }
20 b { 20 b @c_only {
21 set { 21 set {
22 eo: null; 22 eo: null;
23 } 23 }
@@ -33,7 +33,7 @@ class Class_Simple {
33 } 33 }
34 return: char * (null); /*@ comment for method return */ 34 return: char * (null); /*@ comment for method return */
35 } 35 }
36 bar { 36 bar @c_only {
37 eo: null; 37 eo: null;
38 params { 38 params {
39 int x; 39 int x;
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 03d6a56..824f9fc 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -590,10 +590,11 @@ START_TEST(eolian_simple_parsing)
590 fail_if(v.type != EOLIAN_EXPR_INT); 590 fail_if(v.type != EOLIAN_EXPR_INT);
591 fail_if(v.value.i != 100); 591 fail_if(v.value.i != 100);
592 592
593 /* legacy only */ 593 /* legacy only + c only */
594 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY))); 594 fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROPERTY)));
595 fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET)); 595 fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET));
596 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET)); 596 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET));
597 fail_if(!eolian_function_is_c_only(fid));
597 598
598 /* Method */ 599 /* Method */
599 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD))); 600 fail_if(!(fid = eolian_class_function_get_by_name(class, "foo", EOLIAN_METHOD)));
@@ -642,9 +643,10 @@ START_TEST(eolian_simple_parsing)
642 fail_if(eina_iterator_next(iter, &dummy)); 643 fail_if(eina_iterator_next(iter, &dummy));
643 eina_iterator_free(iter); 644 eina_iterator_free(iter);
644 645
645 /* legacy only */ 646 /* legacy only + c only */
646 fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD))); 647 fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD)));
647 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD)); 648 fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
649 fail_if(!eolian_function_is_c_only(fid));
648 650
649 eolian_shutdown(); 651 eolian_shutdown();
650} 652}