summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Browaeys <prahal@yahoo.com>2012-07-24 15:34:24 +0200
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2012-08-03 13:57:28 +0200
commit0b3162bb981038027c3fcdfccff0767bedf25743 (patch)
tree3af360ae984b10da8059c0083ed5ec39f986ec28
parent8b4d1acc40c03ddb0255b6a9f10ee5d731b39016 (diff)
downloadgobject-introspection-0b3162bb981038027c3fcdfccff0767bedf25743.tar.gz
Test typedef in #define
requires "handle unsigned properly for type of defined size" patch.
-rw-r--r--tests/scanner/Regress-1.0-expected.gir8
-rw-r--r--tests/scanner/regress.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 9b773fb5..4d4dcd70 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -28,6 +28,9 @@ and/or use gtk-doc annotations. -->
<doc xml:whitespace="preserve">Typedef'd GPtrArray for some reason</doc>
<type name="GLib.PtrArray" c:type="GPtrArray"/>
</alias>
+ <alias name="TestTypeGUInt64" c:type="RegressTestTypeGUInt64">
+ <type name="guint64" c:type="guint64"/>
+ </alias>
<alias name="VaListAlias" c:type="RegressVaListAlias" introspectable="0">
<doc xml:whitespace="preserve">Typedef'd va_list for additional reasons</doc>
<type name="va_list" c:type="va_list"/>
@@ -49,6 +52,11 @@ and/or use gtk-doc annotations. -->
c:type="REGRESS_GUINT64_CONSTANT">
<type name="guint64" c:type="guint64"/>
</constant>
+ <constant name="GUINT64_CONSTANTA"
+ value="18446744073709551615"
+ c:type="REGRESS_GUINT64_CONSTANTA">
+ <type name="TestTypeGUInt64" c:type="RegressTestTypeGUInt64"/>
+ </constant>
<constant name="G_GINT64_CONSTANT"
value="1000"
c:type="REGRESS_G_GINT64_CONSTANT">
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index ce5d1dc2..511201b5 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -262,6 +262,9 @@ GQuark regress_atest_error_quark (void);
#define REGRESS_G_GINT64_CONSTANT (G_GINT64_CONSTANT (1000))
#define REGRESS_GUINT64_CONSTANT ((guint64) -1)
+typedef guint64 RegressTestTypeGUInt64;
+#define REGRESS_GUINT64_CONSTANTA ((RegressTestTypeGUInt64) -1)
+
/* structures */
typedef struct _RegressTestStructA RegressTestStructA;
typedef struct _RegressTestStructB RegressTestStructB;