summaryrefslogtreecommitdiff
path: root/tests/scanner
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2009-11-23 10:52:09 -0500
committerDan Winship <danw@gnome.org>2009-11-23 10:52:09 -0500
commitab127091d84336a851e0cec9cfdd0435065d9e2a (patch)
treeee774a422964ee3d70e531521ef3f5dc814a4ea8 /tests/scanner
parent0bb6ce54f796c00fcf370de07f3bfcfa8d574834 (diff)
downloadgobject-introspection-ab127091d84336a851e0cec9cfdd0435065d9e2a.tar.gz
Fix enum prefix stripping to work only up to word boundaries
https://bugzilla.gnome.org/show_bug.cgi?id=602672
Diffstat (limited to 'tests/scanner')
-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.h7
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/scanner/foo-1.0-expected.gir b/tests/scanner/foo-1.0-expected.gir
index 85c2322a..fa3d73cd 100644
--- a/tests/scanner/foo-1.0-expected.gir
+++ b/tests/scanner/foo-1.0-expected.gir
@@ -23,6 +23,11 @@ and/or use gtk-doc annotations. -->
value="0"
c:identifier="FOO_SOME_SINGLE_ENUM"/>
</enumeration>
+ <enumeration name="AddressType" c:type="FooAddressType">
+ <member name="invalid" value="0" c:identifier="FOO_ADDRESS_INVALID"/>
+ <member name="ipv4" value="1" c:identifier="FOO_ADDRESS_IPV4"/>
+ <member name="ipv6" value="2" c:identifier="FOO_ADDRESS_IPV6"/>
+ </enumeration>
<record name="BRect"
c:type="FooBRect"
glib:type-name="FooBRect"
diff --git a/tests/scanner/foo-1.0-expected.tgir b/tests/scanner/foo-1.0-expected.tgir
index 8504bc49..bcba5a2e 100644
--- a/tests/scanner/foo-1.0-expected.tgir
+++ b/tests/scanner/foo-1.0-expected.tgir
@@ -10,6 +10,11 @@
<enumeration name="ASingle">
<member name="some_single_enum" value="0"/>
</enumeration>
+ <enumeration name="AddressType">
+ <member name="invalid" value="0"/>
+ <member name="ipv4" value="1"/>
+ <member name="ipv6" value="2"/>
+ </enumeration>
<record name="BRect" glib:type-name="FooBRect" glib:get-type="foo_brect_get_type">
<field name="x" writable="1">
<type name="double"/>
diff --git a/tests/scanner/foo.h b/tests/scanner/foo.h
index 7c2afe63..199d57a0 100644
--- a/tests/scanner/foo.h
+++ b/tests/scanner/foo.h
@@ -188,6 +188,13 @@ typedef enum
FOO_ENUM_FULLNAME_THREE
} FooEnumFullname;
+typedef enum
+{
+ FOO_ADDRESS_INVALID,
+ FOO_ADDRESS_IPV4,
+ FOO_ADDRESS_IPV6
+} FooAddressType;
+
typedef struct _FooBoxed FooBoxed;
GType foo_boxed_get_type (void) G_GNUC_CONST;