summaryrefslogtreecommitdiff
path: root/src/tests/eolian/eolian_parsing.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-08 15:55:02 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-08 15:57:15 +0100
commit7a38f8ec2129a4ae7ca1c1f76fba47d0cd1f7052 (patch)
tree5c033391f8fa496b2d6e6986843569d4e6c6956c /src/tests/eolian/eolian_parsing.c
parent15a64fdc86840e1a84e67abe113eb60d0f9545b5 (diff)
eolian: support for @since tag in new doc comments
This is kind of ugly, but I didn't see a better way to do it without turning this into a much more complicated parser. So this will have to do unless we find something else to add, in which case a new doc parser will be required. @feature
Diffstat (limited to '')
-rw-r--r--src/tests/eolian/eolian_parsing.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index ed0626a9eb..f5e441ba85 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -1125,6 +1125,8 @@ START_TEST(eolian_docs)
1125 fail_if(strcmp(eolian_documentation_description_get(doc), 1125 fail_if(strcmp(eolian_documentation_description_get(doc),
1126 "This is a longer description for struct Foo.\n\n" 1126 "This is a longer description for struct Foo.\n\n"
1127 "This is another paragraph.")); 1127 "This is another paragraph."));
1128 fail_if(strcmp(eolian_documentation_since_get(doc),
1129 "1.66"));
1128 1130
1129 fail_if(!(sfl = eolian_type_struct_field_get(type, "field1"))); 1131 fail_if(!(sfl = eolian_type_struct_field_get(type, "field1")));
1130 fail_if(!(doc = eolian_type_struct_field_documentation_get(sfl))); 1132 fail_if(!(doc = eolian_type_struct_field_documentation_get(sfl)));
@@ -1146,6 +1148,7 @@ START_TEST(eolian_docs)
1146 fail_if(strcmp(eolian_documentation_summary_get(doc), 1148 fail_if(strcmp(eolian_documentation_summary_get(doc),
1147 "Docs for enum Bar.")); 1149 "Docs for enum Bar."));
1148 fail_if(eolian_documentation_description_get(doc)); 1150 fail_if(eolian_documentation_description_get(doc));
1151 fail_if(eolian_documentation_since_get(doc));
1149 1152
1150 fail_if(!(efl = eolian_type_enum_field_get(type, "blah"))); 1153 fail_if(!(efl = eolian_type_enum_field_get(type, "blah")));
1151 fail_if(eolian_type_enum_field_documentation_get(efl)); 1154 fail_if(eolian_type_enum_field_documentation_get(efl));
@@ -1168,6 +1171,8 @@ START_TEST(eolian_docs)
1168 "Docs for typedef.")); 1171 "Docs for typedef."));
1169 fail_if(strcmp(eolian_documentation_description_get(doc), 1172 fail_if(strcmp(eolian_documentation_description_get(doc),
1170 "More docs for typedef. See @Bar.")); 1173 "More docs for typedef. See @Bar."));
1174 fail_if(strcmp(eolian_documentation_since_get(doc),
1175 "2.0"));
1171 1176
1172 fail_if(!(var = eolian_variable_global_get_by_name("pants"))); 1177 fail_if(!(var = eolian_variable_global_get_by_name("pants")));
1173 fail_if(!(doc = eolian_variable_documentation_get(var))); 1178 fail_if(!(doc = eolian_variable_documentation_get(var)));
@@ -1224,6 +1229,8 @@ START_TEST(eolian_docs)
1224 fail_if(strcmp(eolian_documentation_summary_get(doc), 1229 fail_if(strcmp(eolian_documentation_summary_get(doc),
1225 "Property common documentation.")); 1230 "Property common documentation."));
1226 fail_if(eolian_documentation_description_get(doc)); 1231 fail_if(eolian_documentation_description_get(doc));
1232 fail_if(strcmp(eolian_documentation_since_get(doc),
1233 "1.18"));
1227 fail_if(!(doc = eolian_function_documentation_get(fid, EOLIAN_PROP_GET))); 1234 fail_if(!(doc = eolian_function_documentation_get(fid, EOLIAN_PROP_GET)));
1228 fail_if(strcmp(eolian_documentation_summary_get(doc), 1235 fail_if(strcmp(eolian_documentation_summary_get(doc),
1229 "Get documentation.")); 1236 "Get documentation."));