summaryrefslogtreecommitdiff
path: root/tests/offsets
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-08-18 19:38:05 -0400
committerColin Walters <walters@verbum.org>2010-08-31 16:05:56 -0400
commitf58c9cd835c6e5077496ea4abf18ecd8907c3288 (patch)
treeb9270b891cb9223a8cc12add7fb030e3f07e2a65 /tests/offsets
parent456a79cb1d3fee93a3e6e1af9ef2948b0866bdd3 (diff)
downloadgobject-introspection-f58c9cd835c6e5077496ea4abf18ecd8907c3288.tar.gz
tests: Fix namespacing for BarApp (should be just Bar)
Diffstat (limited to 'tests/offsets')
-rw-r--r--tests/offsets/Makefile.am15
-rwxr-xr-xtests/offsets/gen-gitestoffsets2
-rw-r--r--tests/offsets/offsets.h38
3 files changed, 28 insertions, 27 deletions
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am
index c778ae3d..c2838282 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 58139fc2..60efa439 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 3f887a8e..1985f39a 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];
};