[gobject-introspection] tests: Move TestInherit into Regress
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] tests: Move TestInherit into Regress
- Date: Thu, 7 Feb 2013 09:27:46 +0000 (UTC)
commit bb1ac9cf2dc450c5d44b1e39e3162ba06069f4a1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Feb 2 12:00:15 2013 -0500
tests: Move TestInherit into Regress
https://bugzilla.gnome.org/show_bug.cgi?id=693097
.gitignore | 1 -
tests/scanner/Makefile.am | 11 +---
tests/scanner/Regress-1.0-expected.gir | 105 ++++++++++++++++++++++++++++++++
tests/scanner/drawable.c | 22 +++---
tests/scanner/drawable.h | 30 +++++-----
5 files changed, 132 insertions(+), 37 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fd079f0..92b3da0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,7 +75,6 @@ tests/scanner/GtkFrob-1.0.gir
tests/scanner/Headeronly-1.0.gir
tests/scanner/Regress-1.0.gir
tests/scanner/SLetter-1.0.gir
-tests/scanner/TestInherit-1.0.gir
tests/scanner/Utility-1.0.gir
tests/scanner/WarnLib-1.0.gir
tests/scanner/barapp
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
index 5200959..cf04508 100644
--- a/tests/scanner/Makefile.am
+++ b/tests/scanner/Makefile.am
@@ -7,7 +7,6 @@ INTROSPECTION_SCANNER_ARGS += --warn-all
check_LTLIBRARIES = \
libsletter.la \
- libtestinherit.la \
libutility.la \
libgtkfrob.la \
libgettype.la \
@@ -27,13 +26,13 @@ libsletter_la_LIBADD = $(GIO_LIBS)
libsletter_la_CFLAGS = $(AM_CFLAGS)
libsletter_la_LDFLAGS = $(AM_LDFLAGS)
-libtestinherit_la_SOURCES = $(srcdir)/drawable.c $(srcdir)/drawable.h
libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
libgtkfrob_la_SOURCES = $(srcdir)/gtkfrob.c $(srcdir)/gtkfrob.h
libregress_la_SOURCES = \
$(srcdir)/regress.c $(srcdir)/regress.h \
$(srcdir)/annotation.c $(srcdir)/annotation.h \
$(srcdir)/foo.c $(srcdir)/foo.h \
+ $(srcdir)/drawable.c $(srcdir)/drawable.h \
$(NULL)
libregress_la_LIBADD = $(GIO_LIBS)
if HAVE_CAIRO
@@ -96,14 +95,6 @@ WarnLib_1_0_gir_FILES = $(libwarnlib_la_SOURCES)
WarnLib_1_0_gir_SCANNERFLAGS = --c-include="warnlib.h" --symbol-prefix=warnlib_
GIRS += WarnLib-1.0.gir
-TestInherit-1.0.gir: Utility-1.0.gir libtestinherit.la
-TestInherit_1_0_gir_PACKAGES = gobject-2.0
-TestInherit_1_0_gir_LIBS = libtestinherit.la
-TestInherit_1_0_gir_INCLUDES = GObject-2.0 Utility-1.0
-TestInherit_1_0_gir_FILES = $(libtestinherit_la_SOURCES)
-TestInherit_1_0_gir_SCANNERFLAGS = --c-include="drawable.h" --warn-error
-GIRS += TestInherit-1.0.gir
-
Utility-1.0.gir: libutility.la
Utility_1_0_gir_PACKAGES = gobject-2.0
Utility_1_0_gir_LIBS = libutility.la
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index 3cb0382..98ad01b 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -2612,6 +2612,111 @@ use it should be.</doc>
c:type="RegressTestFundamentalObjectClass"/>
</field>
</record>
+ <class name="TestInheritDrawable"
+ c:symbol-prefix="test_inherit_drawable"
+ c:type="RegressTestInheritDrawable"
+ parent="GObject.Object"
+ abstract="1"
+ glib:type-name="RegressTestInheritDrawable"
+ glib:get-type="regress_test_inherit_drawable_get_type"
+ glib:type-struct="TestInheritDrawableClass">
+ <method name="do_foo"
+ c:identifier="regress_test_inherit_drawable_do_foo">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="drawable" transfer-ownership="none">
+ <type name="TestInheritDrawable"
+ c:type="RegressTestInheritDrawable*"/>
+ </instance-parameter>
+ <parameter name="x" transfer-ownership="none">
+ <type name="gint" c:type="int"/>
+ </parameter>
+ </parameters>
+ </method>
+ <method name="do_foo_maybe_throw"
+ c:identifier="regress_test_inherit_drawable_do_foo_maybe_throw"
+ throws="1">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="drawable" transfer-ownership="none">
+ <type name="TestInheritDrawable"
+ c:type="RegressTestInheritDrawable*"/>
+ </instance-parameter>
+ <parameter name="x" transfer-ownership="none">
+ <type name="gint" c:type="int"/>
+ </parameter>
+ </parameters>
+ </method>
+ <method name="get_origin"
+ c:identifier="regress_test_inherit_drawable_get_origin">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="drawable" transfer-ownership="none">
+ <type name="TestInheritDrawable"
+ c:type="RegressTestInheritDrawable*"/>
+ </instance-parameter>
+ <parameter name="x"
+ direction="out"
+ caller-allocates="0"
+ transfer-ownership="full">
+ <type name="gint" c:type="int*"/>
+ </parameter>
+ <parameter name="y"
+ direction="out"
+ caller-allocates="0"
+ transfer-ownership="full">
+ <type name="gint" c:type="int*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <method name="get_size"
+ c:identifier="regress_test_inherit_drawable_get_size">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="drawable" transfer-ownership="none">
+ <type name="TestInheritDrawable"
+ c:type="RegressTestInheritDrawable*"/>
+ </instance-parameter>
+ <parameter name="width"
+ direction="out"
+ caller-allocates="0"
+ transfer-ownership="full">
+ <type name="guint" c:type="guint*"/>
+ </parameter>
+ <parameter name="height"
+ direction="out"
+ caller-allocates="0"
+ transfer-ownership="full">
+ <type name="guint" c:type="guint*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <field name="parent_instance">
+ <type name="GObject.Object" c:type="GObject"/>
+ </field>
+ </class>
+ <record name="TestInheritDrawableClass"
+ c:type="RegressTestInheritDrawableClass"
+ glib:is-gtype-struct-for="TestInheritDrawable">
+ <field name="parent_class">
+ <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+ </field>
+ </record>
+ <record name="TestInheritPixmapObjectClass"
+ c:type="RegressTestInheritPixmapObjectClass">
+ <field name="parent_class" writable="1">
+ <type name="TestInheritDrawableClass"
+ c:type="RegressTestInheritDrawableClass"/>
+ </field>
+ </record>
<interface name="TestInterface"
c:symbol-prefix="test_interface"
c:type="RegressTestInterface"
diff --git a/tests/scanner/drawable.c b/tests/scanner/drawable.c
index 6ab8ecf..e378286 100644
--- a/tests/scanner/drawable.c
+++ b/tests/scanner/drawable.c
@@ -1,54 +1,54 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#include "drawable.h"
-G_DEFINE_ABSTRACT_TYPE (TestInheritDrawable, test_inherit_drawable, G_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE (RegressTestInheritDrawable, regress_test_inherit_drawable, G_TYPE_OBJECT);
static void
-test_inherit_drawable_class_init (TestInheritDrawableClass *klass)
+regress_test_inherit_drawable_class_init (RegressTestInheritDrawableClass *klass)
{
}
static void
-test_inherit_drawable_init (TestInheritDrawable *drawable)
+regress_test_inherit_drawable_init (RegressTestInheritDrawable *drawable)
{
}
-void
-test_inherit_drawable_do_foo (TestInheritDrawable *drawable, int x)
+void
+regress_test_inherit_drawable_do_foo (RegressTestInheritDrawable *drawable, int x)
{
-
+
}
/**
- * test_inherit_drawable_get_origin:
+ * regress_test_inherit_drawable_get_origin:
* @drawable:
* @x: (out):
* @y: (out):
*/
void
-test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y)
+regress_test_inherit_drawable_get_origin (RegressTestInheritDrawable *drawable, int *x, int *y)
{
*x = 0;
*y = 0;
}
/**
- * test_inherit_drawable_get_size:
+ * regress_test_inherit_drawable_get_size:
* @drawable:
* @width: (out):
* @height: (out):
*/
void
-test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height)
+regress_test_inherit_drawable_get_size (RegressTestInheritDrawable *drawable, guint *width, guint *height)
{
*width = 42;
*height = 42;
}
void
-test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error)
+regress_test_inherit_drawable_do_foo_maybe_throw (RegressTestInheritDrawable *drawable, int x, GError **error)
{
if (x != 42)
g_set_error(error, 0, 12, "The answer should be 42!");
diff --git a/tests/scanner/drawable.h b/tests/scanner/drawable.h
index d1752e4..5838358 100644
--- a/tests/scanner/drawable.h
+++ b/tests/scanner/drawable.h
@@ -1,33 +1,33 @@
-#ifndef __TEST_INHERIT_DRAWABLE_H__
-#define __TEST_INHERIT_DRAWABLE_H__
+#ifndef __REGRESS_TEST_INHERIT_DRAWABLE_H__
+#define __REGRESS_TEST_INHERIT_DRAWABLE_H__
#include <glib-object.h>
-typedef struct _TestInheritDrawable TestInheritDrawable;
-typedef struct _TestInheritDrawableClass TestInheritDrawableClass;
+typedef struct _RegressTestInheritDrawable RegressTestInheritDrawable;
+typedef struct _RegressTestInheritDrawableClass RegressTestInheritDrawableClass;
-struct _TestInheritDrawable
+struct _RegressTestInheritDrawable
{
GObject parent_instance;
};
-struct _TestInheritDrawableClass
+struct _RegressTestInheritDrawableClass
{
GObjectClass parent_class;
};
-GType test_inherit_drawable_get_type (void) G_GNUC_CONST;
+GType regress_test_inherit_drawable_get_type (void) G_GNUC_CONST;
-void test_inherit_drawable_do_foo (TestInheritDrawable *drawable, int x);
-void test_inherit_drawable_get_origin (TestInheritDrawable *drawable, int *x, int *y);
-void test_inherit_drawable_get_size (TestInheritDrawable *drawable, guint *width, guint *height);
-void test_inherit_drawable_do_foo_maybe_throw (TestInheritDrawable *drawable, int x, GError **error);
+void regress_test_inherit_drawable_do_foo (RegressTestInheritDrawable *drawable, int x);
+void regress_test_inherit_drawable_get_origin (RegressTestInheritDrawable *drawable, int *x, int *y);
+void regress_test_inherit_drawable_get_size (RegressTestInheritDrawable *drawable, guint *width, guint *height);
+void regress_test_inherit_drawable_do_foo_maybe_throw (RegressTestInheritDrawable *drawable, int x, GError **error);
-typedef struct _TestInheritPixmapObjectClass TestInheritPixmapObjectClass;
+typedef struct _RegressTestInheritPixmapObjectClass RegressTestInheritPixmapObjectClass;
-struct _TestInheritPixmapObjectClass
+struct _RegressTestInheritPixmapObjectClass
{
- TestInheritDrawableClass parent_class;
+ RegressTestInheritDrawableClass parent_class;
};
-#endif /* __TEST_INHERIT_DRAWABLE_H__ */
+#endif /* __REGRESS_TEST_INHERIT_DRAWABLE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]