[gobject-introspection] Test typedef in #define



commit 0b3162bb981038027c3fcdfccff0767bedf25743
Author: Alban Browaeys <prahal yahoo com>
Date:   Tue Jul 24 15:34:24 2012 +0200

    Test typedef in #define
    
    requires "handle unsigned properly for type of defined size" patch.

 tests/scanner/Regress-1.0-expected.gir |    8 ++++++++
 tests/scanner/regress.h                |    3 +++
 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 9b773fb..4d4dcd7 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 ce5d1dc..511201b 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]