summaryrefslogtreecommitdiff
path: root/tests/repository
diff options
context:
space:
mode:
authorTommi Komulainen <tommi.komulainen@iki.fi>2008-10-12 21:57:32 +0000
committerTommi Komulainen <tko@src.gnome.org>2008-10-12 21:57:32 +0000
commit5b49f52893815c63f4268b5ad27e27291aa433b7 (patch)
treef0dccc16f015704f74d627bc5f2d9c258063bdfb /tests/repository
parent9279ac52f7f45a49fc5e114bca12c7e5e8af62f9 (diff)
downloadgobject-introspection-5b49f52893815c63f4268b5ad27e27291aa433b7.tar.gz
run 'gitestrepo' in 'make check' instantiate 'GCancellable' to ensure the
2008-10-12 Tommi Komulainen <tommi.komulainen@iki.fi> * tests/repository/Makefile.am: run 'gitestrepo' in 'make check' * tests/repository/gitestrepo.c (main): instantiate 'GCancellable' to ensure the GType is registered before using g_type_from_name() svn path=/trunk/; revision=699
Diffstat (limited to 'tests/repository')
-rw-r--r--tests/repository/Makefile.am2
-rw-r--r--tests/repository/gitestrepo.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/repository/Makefile.am b/tests/repository/Makefile.am
index 916941fd..ad73f2f8 100644
--- a/tests/repository/Makefile.am
+++ b/tests/repository/Makefile.am
@@ -8,4 +8,4 @@ gitestrepo_SOURCES = $(srcdir)/gitestrepo.c
gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
gitestrepo_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
-TESTS = # gitestrepo \ No newline at end of file
+TESTS = gitestrepo
diff --git a/tests/repository/gitestrepo.c b/tests/repository/gitestrepo.c
index 62dfef8e..324df26e 100644
--- a/tests/repository/gitestrepo.c
+++ b/tests/repository/gitestrepo.c
@@ -11,6 +11,7 @@ main(int argc, char **argv)
gboolean ret;
GError *error = NULL;
GIBaseInfo *info;
+ GType gtype;
g_type_init ();
@@ -22,6 +23,10 @@ main(int argc, char **argv)
info = g_irepository_find_by_name (repo, "Gio", "Cancellable");
g_assert (info != NULL);
+ g_assert (g_base_info_get_type (info) == GI_INFO_TYPE_OBJECT);
+
+ gtype = g_registered_type_info_get_g_type ((GIRegisteredTypeInfo *)info);
+ g_assert (g_type_is_a (gtype, G_TYPE_OBJECT));
info = g_irepository_find_by_gtype (repo, g_type_from_name ("GCancellable"));
g_assert (info != NULL);