diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-08-25 11:21:05 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-09-03 09:36:39 +0800 |
commit | 5143afb1e79f4a67f57499ca60f6df3a4682eb21 (patch) | |
tree | 7fa93db35b96da90a85639227ef02f7053543752 /tests | |
parent | 3a5a6dff8238fd10345ba94c255826658f4ea714 (diff) | |
download | gobject-introspection-5143afb1e79f4a67f57499ca60f6df3a4682eb21.tar.gz |
tests: Export the Symbols from the Offsets Tests
Like the other test programs, include config.h before anything and decorate
the lone symbols for export, and include $(top_srcdir)/tests so that
gitestmacros.h can be found and used.
https://bugzilla.gnome.org/show_bug.cgi?id=732669
Diffstat (limited to 'tests')
-rw-r--r-- | tests/offsets/Makefile.am | 6 | ||||
-rw-r--r-- | tests/offsets/offsets.c | 3 | ||||
-rw-r--r-- | tests/offsets/offsets.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/tests/offsets/Makefile.am b/tests/offsets/Makefile.am index 9608ad06..65d87733 100644 --- a/tests/offsets/Makefile.am +++ b/tests/offsets/Makefile.am @@ -16,7 +16,7 @@ EXTRA_LTLIBRARIES += liboffsets.la liboffsets_la_SOURCES = \ offsets.h \ offsets.c -liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) +liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) -I$(top_srcdir)/tests # dummy rpath to get built dynamically (huh?) liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir) @@ -25,7 +25,7 @@ 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 +Offsets_1_0_gir_SCANNERFLAGS = --warn-all --warn-error -I$(top_srcdir)/tests INTROSPECTION_GIRS += Offsets-1.0.gir CLEANFILES += Offsets-1.0.gir Offsets-1.0.typelib liboffsets.la @@ -35,7 +35,7 @@ CLEANFILES += Offsets-1.0.gir Offsets-1.0.typelib liboffsets.la EXTRA_PROGRAMS += gitestoffsets nodist_gitestoffsets_SOURCES = gitestoffsets.c -gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository +gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository -I$(top_srcdir)/tests gitestoffsets_LDADD = $(top_builddir)/libgirepository-1.0.la $(GIREPO_LIBS) gitestoffsets.c: gen-gitestoffsets offsets.h Offsets-1.0.typelib diff --git a/tests/offsets/offsets.c b/tests/offsets/offsets.c index bd009e88..d8a280eb 100644 --- a/tests/offsets/offsets.c +++ b/tests/offsets/offsets.c @@ -1,5 +1,8 @@ +#include "config.h" + #include <offsets.h> +_GI_TEST_EXTERN void offsets_dummy(void); /* To avoid an empty compilation unit */ diff --git a/tests/offsets/offsets.h b/tests/offsets/offsets.h index 7bdc1ad7..b57b1bfc 100644 --- a/tests/offsets/offsets.h +++ b/tests/offsets/offsets.h @@ -5,6 +5,8 @@ #include <glib-object.h> #include <time.h> +#include "gitestmacros.h" + /* Test we get the alignment right for various basic types; we put * a char in front of of each field to make it more likely that we'll * stress out the alignment code. |