gobject-introspection r683 - in trunk: . girepository tests tests/repository
- From: walters svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r683 - in trunk: . girepository tests tests/repository
- Date: Sun, 12 Oct 2008 16:36:29 +0000 (UTC)
Author: walters
Date: Sun Oct 12 16:36:29 2008
New Revision: 683
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=683&view=rev
Log:
Add tests/repository which has some repository regression tests
Added:
trunk/tests/repository/
trunk/tests/repository/Makefile.am
trunk/tests/repository/gitestrepo.c
Modified:
trunk/configure.ac
trunk/girepository/girepository.c
trunk/tests/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Oct 12 16:36:29 2008
@@ -150,6 +150,7 @@
tests/Makefile
tests/invoke/Makefile
tests/scanner/Makefile
+tests/repository/Makefile
tests/types/Makefile
gobject-introspection-1.0.pc])
AC_OUTPUT
Modified: trunk/girepository/girepository.c
==============================================================================
--- trunk/girepository/girepository.c (original)
+++ trunk/girepository/girepository.c Sun Oct 12 16:36:29 2008
@@ -490,7 +490,7 @@
for (i = 1; i <= n_entries; i++)
{
entry = g_typelib_get_dir_entry (typelib, i);
- if (entry->blob_type < 4)
+ if (entry->blob_type < BLOB_TYPE_BOXED)
continue;
offset = *(guint32*)&typelib->data[entry->offset + 8];
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Sun Oct 12 16:36:29 2008
@@ -1,4 +1,4 @@
-SUBDIRS = . invoke scanner types
+SUBDIRS = . invoke scanner repository types
EXTRA_DIST = \
array.gir \
Added: trunk/tests/repository/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/tests/repository/Makefile.am Sun Oct 12 16:36:29 2008
@@ -0,0 +1,11 @@
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+AM_LDFLAGS = -module -avoid-version
+LIBS = $(GOBJECT_LIBS)
+
+noinst_PROGRAMS = gitestrepo
+
+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
Added: trunk/tests/repository/gitestrepo.c
==============================================================================
--- (empty file)
+++ trunk/tests/repository/gitestrepo.c Sun Oct 12 16:36:29 2008
@@ -0,0 +1,30 @@
+
+#include "girepository.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main(int argc, char **argv)
+{
+ GIRepository *repo;
+ gboolean ret;
+ GError *error = NULL;
+ GIBaseInfo *info;
+
+ g_type_init ();
+
+ repo = g_irepository_get_default ();
+
+ ret = g_irepository_require (repo, "Gio", NULL, 0, &error);
+ g_assert (ret);
+ g_assert (error == NULL);
+
+ info = g_irepository_find_by_name (repo, "Gio", "Cancellable");
+ g_assert (info != NULL);
+
+ info = g_irepository_find_by_gtype (repo, g_type_from_name ("GCancellable"));
+ g_assert (info != NULL);
+
+ exit(0);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]