summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/foo-1.0-expected.gir5
-rw-r--r--tests/scanner/foo-1.0-expected.tgir5
-rw-r--r--tests/scanner/foo.c5
-rw-r--r--tests/scanner/foo.h7
4 files changed, 22 insertions, 0 deletions
diff --git a/tests/scanner/foo-1.0-expected.gir b/tests/scanner/foo-1.0-expected.gir
index 3d209e3..20eb437 100644
--- a/tests/scanner/foo-1.0-expected.gir
+++ b/tests/scanner/foo-1.0-expected.gir
@@ -241,6 +241,11 @@ and/or use gtk-doc annotations. -->
c:identifier="FOO_FLAGS_THIRD"
glib:nick="third"/>
</bitfield>
+ <record name="ForeignStruct" c:type="FooForeignStruct" foreign="1">
+ <field name="foo" writable="1">
+ <type name="int" c:type="int"/>
+ </field>
+ </record>
<interface name="Interface"
c:type="FooInterface"
glib:type-name="FooInterface"
diff --git a/tests/scanner/foo-1.0-expected.tgir b/tests/scanner/foo-1.0-expected.tgir
index 29753af..c0bedbe 100644
--- a/tests/scanner/foo-1.0-expected.tgir
+++ b/tests/scanner/foo-1.0-expected.tgir
@@ -170,6 +170,11 @@
<member name="second" value="2"/>
<member name="third" value="4"/>
</bitfield>
+ <record name="ForeignStruct" foreign="1">
+ <field name="foo" writable="1">
+ <type name="int"/>
+ </field>
+ </record>
<interface name="Interface" glib:type-name="FooInterface" glib:get-type="foo_interface_get_type" glib:type-struct="InterfaceIface">
<method name="do_foo" c:identifier="foo_interface_do_foo">
<return-value transfer-ownership="none">
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c
index a404aac..6239bfa 100644
--- a/tests/scanner/foo.c
+++ b/tests/scanner/foo.c
@@ -621,3 +621,8 @@ void
foo_skip_me (FooSkippable fs)
{
}
+
+/**
+ * FooForeignStruct: (foreign)
+ *
+ */
diff --git a/tests/scanner/foo.h b/tests/scanner/foo.h
index 0ebcca2..fb4bc5c 100644
--- a/tests/scanner/foo.h
+++ b/tests/scanner/foo.h
@@ -393,5 +393,12 @@ typedef enum {
} FooSkippable;
void foo_skip_me (FooSkippable fs);
+typedef struct _FooForeignStruct FooForeignStruct;
+
+struct _FooForeignStruct
+{
+ int foo;
+};
+
#endif /* __FOO_OBJECT_H__ */