[gobject-introspection/wip/transformer: 6/14] tests: Fix namespacing for offsets



commit 34f7f52b5fd16cec2d6b04f07d2a5c094cb9e808
Author: Colin Walters <walters verbum org>
Date:   Thu Aug 19 10:27:16 2010 -0400

    tests: Fix namespacing for offsets

 tests/offsets/Makefile.am       |   15 ++++++++-------
 tests/offsets/gen-gitestoffsets |    2 +-
 tests/offsets/offsets.h         |   38 +++++++++++++++++++-------------------
 3 files changed, 28 insertions(+), 27 deletions(-)
---
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
index c778ae3..c283828 100644
--- a/tests/offsets/Makefile.am
+++ b/tests/offsets/Makefile.am
@@ -20,12 +20,13 @@ liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS)
 # dummy rpath to get built dynamically (huh?)
 liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir)
 
-offsets-1.0.gir: liboffsets.la offsets.h
-offsets_1_0_gir_INCLUDES = GObject-2.0
-offsets_1_0_gir_LIBS = liboffsets.la
-offsets_1_0_gir_PACKAGES = gobject-2.0
-offsets_1_0_gir_FILES = $(srcdir)/offsets.h $(srcdir)/offsets.c
-INTROSPECTION_GIRS += offsets-1.0.gir
+Offsets-1.0.gir: liboffsets.la offsets.h
+Offsets_1_0_gir_INCLUDES = GObject-2.0
+Offsets_1_0_gir_LIBS = liboffsets.la
+Offsets_1_0_gir_PACKAGES = gobject-2.0
+Offsets_1_0_gir_FILES = $(srcdir)/offsets.h $(srcdir)/offsets.c
+Offsets_1_0_gir_SCANNERFLAGS = --warn-all --warn-error
+INTROSPECTION_GIRS += Offsets-1.0.gir
 
 CLEANFILES += offsets-1.0.gir offsets-1.0.typelib
 
@@ -46,7 +47,7 @@ CLEANFILES += gitestoffsets.c
 
 ############################################################
 
-check-local: offsets-1.0.typelib
+check-local: Offsets-1.0.typelib
 	GI_TYPELIB_PATH=:$(top_builddir)/gir ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
 	diff -u offsets.compiled offsets.introspected
 
diff --git a/tests/offsets/gen-gitestoffsets b/tests/offsets/gen-gitestoffsets
index 58139fc..60efa43 100755
--- a/tests/offsets/gen-gitestoffsets
+++ b/tests/offsets/gen-gitestoffsets
@@ -107,7 +107,7 @@ output({}, r'''
 |#include "offsets.h"
 |
 |static GIRepository *repository;
-|static const char *namespace = "offsets";
+|static const char *namespace = "Offsets";
 |static const char *version = "1.0";
 |
 |static void
diff --git a/tests/offsets/offsets.h b/tests/offsets/offsets.h
index 3f887a8..1985f39 100644
--- a/tests/offsets/offsets.h
+++ b/tests/offsets/offsets.h
@@ -33,28 +33,28 @@ struct _OffsetsBasic {
 };
 
 typedef enum {
-  ENUM_1 = 1 /* compiler could use int8, uint8, int16, uint16, int32, uint32 */
-} Enum1;
+  OFFSETS_ENUM_1 = 1 /* compiler could use int8, uint8, int16, uint16, int32, uint32 */
+} OffsetsEnum1;
 
 typedef enum {
-  ENUM_2 = 128 /* compiler could use uint8, int16, uint16, int32, uint32 */
-} Enum2;
+  OFFSETS_ENUM_2 = 128 /* compiler could use uint8, int16, uint16, int32, uint32 */
+} OffsetsEnum2;
 
 typedef enum {
-  ENUM_3 = 257 /* compiler could use int16, uint16, int32, uint32 */
-} Enum3;
+  OFFSETS_ENUM_3 = 257 /* compiler could use int16, uint16, int32, uint32 */
+} OffsetsEnum3;
 
 typedef enum {
-  ENUM_4 = G_MAXSHORT + 1 /* compiler could use uint16, int32, uint32 */
-} Enum4;
+  OFFSETS_ENUM_4 = G_MAXSHORT + 1 /* compiler could use uint16, int32, uint32 */
+} OffsetsEnum4;
 
 typedef enum {
-  ENUM_5 = G_MAXUSHORT + 1 /* compiler could use int32, uint32 */
-} Enum5;
+  OFFSETS_ENUM_5 = G_MAXUSHORT + 1 /* compiler could use int32, uint32 */
+} OffsetsEnum5;
 
 typedef enum {
-  ENUM_6 = ((guint)G_MAXINT) + 1 /* compiler could use uint32 */
-} Enum6;
+  OFFSETS_ENUM_6 = ((guint)G_MAXINT) + 1 /* compiler could use uint32 */
+} OffsetsEnum6;
 
 /* Test that we get the width of enum fields right. The char after
  * each field will have aligment 1 (almost certainly) so should
@@ -63,17 +63,17 @@ typedef enum {
 typedef struct _OffsetsEnum OffsetsEnum;
 
 struct _OffsetsEnum {
-  Enum1 enum1;
+  OffsetsEnum1 enum1;
   char dummy1;
-  Enum2 enum2;
+  OffsetsEnum2 enum2;
   char dummy2;
-  Enum3 enum3;
+  OffsetsEnum3 enum3;
   char dummy3;
-  Enum4 enum4;
+  OffsetsEnum4 enum4;
   char dummy4;
-  Enum5 enum5;
+  OffsetsEnum5 enum5;
   char dummy5;
-  Enum6 enum6;
+  OffsetsEnum6 enum6;
   char dummy6;
 };
 
@@ -115,7 +115,7 @@ struct _OffsetsArray
   gint some_ints[2];
   gint8 some_int8s[3];
   gdouble some_doubles[4];
-  Enum1 some_enum[2];
+  OffsetsEnum1 some_enum[2];
   gpointer some_ptrs[5];
 };
 



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