diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scanner/annotation-1.0-expected.gir | 7 | ||||
-rw-r--r-- | tests/scanner/annotation-1.0-expected.tgir | 7 | ||||
-rw-r--r-- | tests/scanner/annotation.c | 9 | ||||
-rw-r--r-- | tests/scanner/annotation.h | 4 |
4 files changed, 27 insertions, 0 deletions
diff --git a/tests/scanner/annotation-1.0-expected.gir b/tests/scanner/annotation-1.0-expected.gir index 053d459..f427345 100644 --- a/tests/scanner/annotation-1.0-expected.gir +++ b/tests/scanner/annotation-1.0-expected.gir @@ -62,6 +62,7 @@ and/or use gtk-doc annotations. --> glib:type-name="AnnotationObject" glib:get-type="annotation_object_get_type" glib:type-struct="ObjectClass"> + <attribute name="org.example.Test" value="cows"/> <method name="method" c:identifier="annotation_object_method"> <return-value transfer-ownership="none"> <type name="int" c:type="gint"/> @@ -426,6 +427,12 @@ type."> <type name="GObject.Object" c:type="GObject*"/> </return-value> </method> + <method name="extra_annos" c:identifier="annotation_object_extra_annos"> + <attribute name="org.foobar" value="testvalue"/> + <return-value transfer-ownership="none"> + <type name="none" c:type="void"/> + </return-value> + </method> <property name="string-property" version="1.0" deprecated="Use better-string-property instead" diff --git a/tests/scanner/annotation-1.0-expected.tgir b/tests/scanner/annotation-1.0-expected.tgir index 643ffb2..2075143 100644 --- a/tests/scanner/annotation-1.0-expected.tgir +++ b/tests/scanner/annotation-1.0-expected.tgir @@ -48,6 +48,7 @@ </parameters> </callback> <class name="Object" parent="GObject.Object" glib:type-struct="ObjectClass" glib:type-name="AnnotationObject" glib:get-type="annotation_object_get_type"> + <attribute name="org.example.Test" value="cows"/> <field name="parent_instance"> <type name="GObject.Object"/> </field> @@ -323,6 +324,12 @@ <type name="GObject.Object"/> </return-value> </method> + <method name="extra_annos" c:identifier="annotation_object_extra_annos"> + <attribute name="org.foobar" value="testvalue"/> + <return-value transfer-ownership="none"> + <type name="none"/> + </return-value> + </method> <property name="string-property" writable="1" construct="1"> <type name="utf8"/> </property> diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c index 20c2729..41508e2 100644 --- a/tests/scanner/annotation.c +++ b/tests/scanner/annotation.c @@ -565,5 +565,14 @@ annotation_versioned (void) { } +/** + * annotation_object_extra_annos: + * + * Attributes: (org.foobar testvalue) + */ +void +annotation_object_extra_annos (AnnotationObject *object) +{ +} char backslash_parsing_tester_2 = '\\'; diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h index 6904f15..79a686d 100644 --- a/tests/scanner/annotation.h +++ b/tests/scanner/annotation.h @@ -25,6 +25,8 @@ typedef GList* (*AnnotationListCallback) (GList *in); * AnnotationObject: * * This is an object used to test annotations. + * + * Attributes: (org.example.Test cows) */ typedef struct _AnnotationObject AnnotationObject; typedef struct _AnnotationObjectClass AnnotationObjectClass; @@ -111,6 +113,8 @@ void annotation_versioned (void); char ** annotation_string_zero_terminated (void); void annotation_string_zero_terminated_out (char ***out); +void annotation_object_extra_annos (AnnotationObject *object); + /** * AnnotationStruct: * |