Test typedef in #define
authorAlban Browaeys <prahal@yahoo.com>
Tue, 24 Jul 2012 13:34:24 +0000 (15:34 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 3 Aug 2012 11:57:28 +0000 (13:57 +0200)
requires "handle unsigned properly for type of defined size" patch.

tests/scanner/Regress-1.0-expected.gir
tests/scanner/regress.h

index 9b773fb..4d4dcd7 100644 (file)
@@ -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">
index ce5d1dc..511201b 100644 (file)
@@ -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;