gobject-introspection r408 - in trunk: . tests/scanner
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r408 - in trunk: . tests/scanner
- Date: Wed, 20 Aug 2008 12:22:56 +0000 (UTC)
Author: johan
Date: Wed Aug 20 12:22:56 2008
New Revision: 408
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=408&view=rev
Log:
2008-08-20 Johan Dahlin <johan gnome org>
* tests/scanner/Foo-expected.gir:
* tests/scanner/Makefile.am:
* tests/scanner/drawable-expected.gir:
* tests/scanner/drawable.c (test_drawable_class_init),
(test_drawable_init):
* tests/scanner/drawable.h:
* tests/scanner/foo-object.h:
* tests/scanner/foo.c (foo_boxed_method):
Move the drawable parts out of Foo to its own test.
Added:
trunk/tests/scanner/drawable-expected.gir
trunk/tests/scanner/drawable.c
trunk/tests/scanner/drawable.h
Modified:
trunk/ChangeLog
trunk/tests/scanner/ (props changed)
trunk/tests/scanner/Foo-expected.gir
trunk/tests/scanner/Makefile.am
trunk/tests/scanner/foo-object.h
trunk/tests/scanner/foo.c
Modified: trunk/tests/scanner/Foo-expected.gir
==============================================================================
--- trunk/tests/scanner/Foo-expected.gir (original)
+++ trunk/tests/scanner/Foo-expected.gir Wed Aug 20 12:22:56 2008
@@ -431,16 +431,5 @@
<type name="EventExpose" c:type="FooEventExpose"/>
</field>
</union>
- <class name="Drawable"
- c:type="FooDrawable"
- parent="GObject.Object"
- glib:type-name="FooDrawable"
- glib:get-type="foo_drawable_get_type">
- </class>
- <record name="PixmapObjectClass" c:type="_FooPixmapObjectClass">
- <field name="parent_class">
- <type name="DrawableClass" c:type="FooDrawableClass"/>
- </field>
- </record>
</namespace>
</repository>
Modified: trunk/tests/scanner/Makefile.am
==============================================================================
--- trunk/tests/scanner/Makefile.am (original)
+++ trunk/tests/scanner/Makefile.am Wed Aug 20 12:22:56 2008
@@ -1,9 +1,14 @@
# We need to build a shared library, which can be dlopened
# it does not work with noinst_LTLIBRARIES
-testlib_LTLIBRARIES = libfoo.la libutility.la
+testlib_LTLIBRARIES = libdrawable.la libfoo.la libutility.la
testlibdir = $(prefix)/unused
install-testlibLTLIBRARIES: # prevent it from being installed
+libdrawable_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
+libdrawable_la_CFLAGS = $(GOBJECT_CFLAGS)
+libdrawable_la_LDFLAGS = -module -avoid-version
+libdrawable_la_LIBADD = $(GOBJECT_LIBS)
+
libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo-object.h
libfoo_la_CFLAGS = $(GOBJECT_CFLAGS)
libfoo_la_LDFLAGS = -module -avoid-version
@@ -18,7 +23,9 @@
EXTRA_DIST = utility-expected.gir Foo-expected.gir
SCANNER = $(top_srcdir)/tools/g-ir-scanner
-SCANNER_LIBS = $(top_srcdir)/giscanner/*.py $(top_builddir)/giscanner/libgiscanner.la
+SCANNER_LIBS = \
+ $(top_srcdir)/giscanner/*.py \
+ $(top_builddir)/giscanner/libgiscanner.la
utility.gir: libutility.la utility.h $(SCANNER) $(SCANNER_LIBS)
$(CHECK_DEBUG) $(SCANNER) -v \
@@ -41,6 +48,16 @@
$(libfoo_la_SOURCES) \
--output $@
+drawable.gir: libdrawable.la drawable.h $(SCANNER) $(SCANNER_LIBS)
+ $(CHECK_DEBUG) $(SCANNER) -v \
+ --include=$(top_srcdir)/gir/glib-2.0.gir \
+ --include=$(top_srcdir)/gir/gobject-2.0.gir \
+ --library=libdrawable.la \
+ --namespace=test \
+ --pkg gobject-2.0 \
+ $(libdrawable_la_SOURCES) \
+ --output $@
+
check-%.gir: %.gir
@diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "* $*.gir"
@@ -50,7 +67,7 @@
fi
@echo "Running scanner checks..."
-check-local: pre-check check-utility.gir check-Foo.gir
+check-local: pre-check check-utility.gir check-drawable.gir check-Foo.gir
@echo "======================="
@echo "All parser tests passed"
@echo "======================="
@@ -58,4 +75,4 @@
rm -f $(top_builddir)/giscanner/*.py*; \
fi
-.PHONY: utility.gir Foo.gir
+.PHONY: utility.gir drawable.gir Foo.gir
Added: trunk/tests/scanner/drawable-expected.gir
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/drawable-expected.gir Wed Aug 20 12:22:56 2008
@@ -0,0 +1,18 @@
+<repository version="1.0"
+ xmlns="http://www.gtk.org/introspection/core/1.0"
+ xmlns:c="http://www.gtk.org/introspection/c/1.0"
+ xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+ <namespace name="test">
+ <class name="Drawable"
+ c:type="TestDrawable"
+ parent="GObject.Object"
+ glib:type-name="TestDrawable"
+ glib:get-type="test_drawable_get_type">
+ </class>
+ <record name="PixmapObjectClass" c:type="_TestPixmapObjectClass">
+ <field name="parent_class">
+ <type name="DrawableClass" c:type="TestDrawableClass"/>
+ </field>
+ </record>
+ </namespace>
+</repository>
Added: trunk/tests/scanner/drawable.c
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/drawable.c Wed Aug 20 12:22:56 2008
@@ -0,0 +1,15 @@
+#include "drawable.h"
+
+G_DEFINE_ABSTRACT_TYPE (TestDrawable, test_drawable, G_TYPE_OBJECT);
+
+static void
+test_drawable_class_init (TestDrawableClass *klass)
+{
+
+}
+
+static void
+test_drawable_init (TestDrawable *drawable)
+{
+
+}
Added: trunk/tests/scanner/drawable.h
==============================================================================
--- (empty file)
+++ trunk/tests/scanner/drawable.h Wed Aug 20 12:22:56 2008
@@ -0,0 +1,26 @@
+#ifndef __TEST_DRAWABLE_H__
+#define __TEST_DRAWABLE_H__
+
+#include <glib-object.h>
+
+typedef struct _TestDrawable TestDrawable;
+typedef struct _TestDrawableClass TestDrawableClass;
+
+struct _TestDrawable
+{
+ GObject parent_instance;
+};
+
+struct _TestDrawableClass
+{
+ GObjectClass parent_class;
+};
+
+GType test_drawable_get_type (void) G_GNUC_CONST;
+
+struct _TestPixmapObjectClass
+{
+ TestDrawableClass parent_class;
+};
+
+#endif /* __TEST_DRAWABLE_H__ */
Modified: trunk/tests/scanner/foo-object.h
==============================================================================
--- trunk/tests/scanner/foo-object.h (original)
+++ trunk/tests/scanner/foo-object.h Wed Aug 20 12:22:56 2008
@@ -183,24 +183,4 @@
typedef void FooXEvent;
-typedef struct _FooDrawable FooDrawable;
-typedef struct _FooDrawableClass FooDrawableClass;
-
-struct _FooDrawable
-{
- GObject parent_instance;
-};
-
-struct _FooDrawableClass
-{
- GObjectClass parent_class;
-};
-
-GType foo_drawable_get_type (void) G_GNUC_CONST;
-
-struct _FooPixmapObjectClass
-{
- FooDrawableClass parent_class;
-};
-
#endif /* __FOO_OBJECT_H__ */
Modified: trunk/tests/scanner/foo.c
==============================================================================
--- trunk/tests/scanner/foo.c (original)
+++ trunk/tests/scanner/foo.c Wed Aug 20 12:22:56 2008
@@ -423,17 +423,3 @@
{
}
-
-G_DEFINE_ABSTRACT_TYPE (FooDrawable, foo_drawable, G_TYPE_OBJECT);
-
-static void
-foo_drawable_class_init (FooDrawableClass *klass)
-{
-
-}
-
-static void
-foo_drawable_init (FooDrawable *drawable)
-{
-
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]