summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi/annotation_unref_func.xml
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-07-25 17:49:11 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:55:50 +0200
commitb6954536f32352c0c29fe5a9a73de1018559a9c5 (patch)
treef0e50185f5c8f0fbe7b0f425fa66a214e926d3e9 /tests/scanner/annotationparser/gi/annotation_unref_func.xml
parenta2b22ce75937d2d996ef90e0ab683d36031365d0 (diff)
downloadgobject-introspection-b6954536f32352c0c29fe5a9a73de1018559a9c5.tar.gz
giscanner: deprecate GObject-Introspection GTK-Doc tags
After discussing a different issue with the GTK-Doc maintainers, we learned that our g-i specific top level tags should never have existed in the first place. The prefered notation for annotations that apply to the identifier should be written on the identifier line, for example like what we already do with (skip). As a result, this patch deprecates g-i specific top level tags and implements them as annotations on the identifier instead but still keeps support for malformed comment blocks using g-i specific top level tags. This means that all annotated code "out there" will continue to work just fine with this version of g-i, but when a developer decides to fix deprecation warnings in his/her comment blocks, the dependency on g-i needs to be raised to a version that contains at least this patch. #676133 https://bugzilla.gnome.org/show_bug.cgi?id=676133
Diffstat (limited to 'tests/scanner/annotationparser/gi/annotation_unref_func.xml')
-rw-r--r--tests/scanner/annotationparser/gi/annotation_unref_func.xml85
1 files changed, 78 insertions, 7 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_unref_func.xml b/tests/scanner/annotationparser/gi/annotation_unref_func.xml
index 528923b2..a8a911c4 100644
--- a/tests/scanner/annotationparser/gi/annotation_unref_func.xml
+++ b/tests/scanner/annotationparser/gi/annotation_unref_func.xml
@@ -3,8 +3,34 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * RegressTestFundamentalObject: (unref-func regress_test_fundamental_object_unref)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>unref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_unref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Unref func:" tag syntax
+ Deprecated "Unref func:" tag syntax
-->
<input>/**
* RegressTestFundamentalObject:
@@ -17,15 +43,60 @@
<docblock>
<identifier>
<name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>unref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_unref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>This object tests regressions...</description>
- <tags>
- <tag>
- <name>unref func</name>
- <value>regress_test_fundamental_object_unref</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Unref func" has been deprecated, please use annotations on the identifier instead:
+ * Unref func: regress_test_fundamental_object_unref
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Unref func:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * RegressTestFundamentalObject:
+ *
+ * Unref func: regress_test_fundamental_object_unref
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>unref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_unref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Unref func" has been deprecated, please use annotations on the identifier instead:
+ * Unref func: regress_test_fundamental_object_unref
+ ^</message>
+ </messages>
</parser>
</test>