diff options
author | Colin Walters <walters@verbum.org> | 2009-03-03 14:55:39 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-03-03 14:55:39 -0500 |
commit | b22ac84b4d31f0c644ca4b52586345f5c87a3135 (patch) | |
tree | 530db90760e7d3aa64d306a5da6ae82e032e8c9f | |
parent | 870698f1613ab9f5bf89a19b9e08a4909b8d7a38 (diff) | |
download | gobject-introspection-b22ac84b4d31f0c644ca4b52586345f5c87a3135.tar.gz |
Remove hand-written .gir files, move PEP-8 inquisition into top Makefile.am
We have more comprehensive testing in tests/scanner and tests/everything,
and these tests were designed from a time when we were trying to make
the g-ir-generate output exactly match the .gir, which has not been true
for some time and will not be in the future.
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | tests/Makefile.am | 41 | ||||
-rw-r--r-- | tests/array.gir | 75 | ||||
-rw-r--r-- | tests/boxed.gir | 70 | ||||
-rw-r--r-- | tests/constant.gir | 23 | ||||
-rw-r--r-- | tests/enum.gir | 23 | ||||
-rw-r--r-- | tests/errors.gir | 25 | ||||
-rw-r--r-- | tests/extended.gir | 17 | ||||
-rw-r--r-- | tests/function.gir | 24 | ||||
-rw-r--r-- | tests/interface.gir | 61 | ||||
-rw-r--r-- | tests/object.gir | 61 | ||||
-rw-r--r-- | tests/struct.gir | 33 | ||||
-rw-r--r-- | tests/types.gir | 17 | ||||
-rw-r--r-- | tests/union.gir | 17 | ||||
-rw-r--r-- | tests/xref1.gir | 20 | ||||
-rw-r--r-- | tests/xref2.gir | 20 |
16 files changed, 6 insertions, 527 deletions
diff --git a/Makefile.am b/Makefile.am index 1a9b67c4..2a4de038 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,3 +50,9 @@ release-tag: upload-release: $(distdir).tar.gz scp $(distdir).tar.gz gnome.org: ssh gnome.org install-module $(distdir).tar.gz + +check-local: + @echo " PEP-8 INQUISITION" + @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat + @echo " CHECK Pyflakes" + @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pyflakes.py diff --git a/tests/Makefile.am b/tests/Makefile.am index 3fe28134..bdaaa334 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,42 +1 @@ SUBDIRS = . scanner everything repository invoke offsets - -EXTRA_DIST = \ - array.gir \ - boxed.gir \ - constant.gir \ - enum.gir \ - errors.gir \ - extended.gir \ - function.gir \ - interface.gir \ - object.gir \ - struct.gir \ - types.gir \ - union.gir \ - xref1.gir \ - xref2.gir - -GIRTESTS = \ - boxed.gir.test \ - constant.gir.test \ - enum.gir.test \ - object.gir.test \ - struct.gir.test - -CLEANFILES = $(GIRTESTS:%.gir.test=%.1) $(GIRTESTS:%.gir.test=%.2) extended.gir.test - -extended.gir.test: $(srcdir)/extended.gir Makefile - $(DEBUG) $(top_builddir)/tools/g-ir-compiler --includedir=$(top_builddir)/gir $(srcdir)/extended.gir -o extended.gir.test - -%.gir.test: %.gir Makefile - @echo " TEST " $< - $(DEBUG) $(top_builddir)/tools/g-ir-compiler --includedir=$(top_builddir)/gir $< > $*.1 - $(DEBUG) $(top_builddir)/tools/g-ir-generate --includedir=$(top_builddir)/gir $*.1 > $*.2 - diff -u $(srcdir)/$*.gir $*.2 && rm $*.1 $*.2 - - -check-local: $(GIRTESTS) extended.gir.test - @echo " CHECK PEP-8" - @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat - @echo " CHECK Pyflakes" - @find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pyflakes.py diff --git a/tests/array.gir b/tests/array.gir deleted file mode 100644 index 718dfd88..00000000 --- a/tests/array.gir +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <function name="test1" c:identifier="test1"> - <return-value> - <type name="boolean" c:type="gboolean"/> - </return-value> - <parameters> - <parameter name="p1"> - <type name="sequence" c:type="guint8*" length="1" zero-terminated="1"> - <type name="uint8" c:type="guint8"/> - </type> - </parameter> - <parameter name="p2"> - <type name="int" c:type="gint"/> - </parameter> - </parameters> - </function> - <function name="test2" c:identifier="test2"> - <return-value> - <type name="boolean" c:type="gboolean"/> - </return-value> - <parameters> - <parameter name="p2"> - <type name="uint" c:type="gint" direction="out"/> - </parameter> - <parameter name="p1"> - <type name="uint8" c:type="guint8*" relation="sequence" length="0" directon="out"> - <type name="uint8" c:type="guint8" relation="element"/> - </type> - </parameter> - </parameters> - </function> - <function name="sequence_test" c:identifier="foo_mapping_test"> - <return-value> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="data"> - <type name="uint8" c:type="guint8*" relation="sequence" length="1" zero-terminated="1"> - <type name="uint8" c:type="guint8" relation="element"/> - </type> - </parameter> - </parameters> - </function> - <function name="sequence_test2" c:identifier="foo_sequence_test2"> - <return-value> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="objects"> - <type name="GLib.SList" c:type="GSList*" relation="sequence"> - <type name="GObject.Object" c:type="GObject*" relation="element"/> - </type> - </parameter> - </parameters> - </function> - <function name="mapping_test" c:identifier="foo_mapping_test"> - <return-value> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="mapping"> - <type name="GLib.HashTable" c:type="GHashTable*" relation="mapping"> - <type name="uint8" c:type="guint8" relation="key"/> - <type name="string" c:type="gchar*" relation="value"/> - </type> - </parameter> - </parameters> - </function> - </namespace> -</repository> diff --git a/tests/boxed.gir b/tests/boxed.gir deleted file mode 100644 index ef0e9a9d..00000000 --- a/tests/boxed.gir +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<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="boxed" version="1.0"> - <glib:boxed glib:name="BoxedType1" glib:type-name="boxed1" glib:get-type="boxed1_get_type" deprecated="1"> - <field name="field1" writable="1"> - <type name="uint32"/> - </field> - <field name="field2" writable="1"> - <type name="uint32"/> - </field> - <field name="field3" writable="1"> - <type name="uint32"/> - </field> - <method name="frob_boxed1" c:identifier="frob_boxed1"> - <return-value transfer-ownership="none"> - <type name="none"/> - </return-value> - <parameters> - <parameter name="box" transfer-ownership="none"> - <type name="BoxedType1"/> - </parameter> - <parameter name="w" transfer-ownership="none"> - <type name="GLib.List"> - <type name="boxed2"/> - </type> - </parameter> - <parameter name="t" transfer-ownership="full"> - <type name="GLib.HashTable"> - <type name="utf8"/> - <type name="int64"/> - </type> - </parameter> - <parameter name="e" transfer-ownership="full" direction="out"> - <type name="GLib.Error"/> - </parameter> - </parameters> - </method> - <method name="lart" c:identifier="lart"> - <return-value transfer-ownership="none"> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="box" transfer-ownership="none"> - <type name="boxed2"/> - </parameter> - <parameter name="val" transfer-ownership="full" direction="inout"> - <type name="uint"/> - </parameter> - </parameters> - </method> - </glib:boxed> - <function name="freefunc" c:identifier="freefunc" deprecated="1"> - <return-value transfer-ownership="none"> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="v1" transfer-ownership="none"> - <type name="int"/> - </parameter> - <parameter name="val2" transfer-ownership="none"> - <type name="int"/> - </parameter> - </parameters> - </function> - <glib:boxed glib:name="boxed2" glib:type-name="BoxedType2" glib:get-type="boxed2_get_type" deprecated="1"/> - </namespace> -</repository> diff --git a/tests/constant.gir b/tests/constant.gir deleted file mode 100644 index 6cb1a523..00000000 --- a/tests/constant.gir +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<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="constant" version="1.0"> - <constant name="constant1" value="42"> - <type name="int"/> - </constant> - <constant name="constant2" value="42"> - <type name="uint"/> - </constant> - <constant name="constant3" value="42"> - <type name="int64"/> - </constant> - <constant name="constant4" value="42"> - <type name="int32"/> - </constant> - <constant name="constant5" value="42.000000"> - <type name="float"/> - </constant> - </namespace> -</repository> diff --git a/tests/enum.gir b/tests/enum.gir deleted file mode 100644 index ed204be7..00000000 --- a/tests/enum.gir +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<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="enum" version="1.0"> - <enumeration name="Enum1" glib:type-name="FooEnum" glib:get-type="foo_enum_get_type"> - <member name="value1" value="0"/> - <member name="value2" value="1"/> - <member name="value3" value="2"/> - </enumeration> - <bitfield name="Flags1" glib:type-name="FooFlags" glib:get-type="foo_flags_get_type"> - <member name="value1" value="1"/> - <member name="value2" value="2"/> - <member name="value3" value="4"/> - </bitfield> - <enumeration name="Enum2"> - <member name="value1" value="0"/> - <member name="value2" value="1"/> - <member name="value3" value="2"/> - </enumeration> - </namespace> -</repository> diff --git a/tests/errors.gir b/tests/errors.gir deleted file mode 100644 index 63534989..00000000 --- a/tests/errors.gir +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <enum name="ErrorCodes1" type-name="ErrorCodes1" get-type="foo_error_codes1_get_type"> - <member name="e1" value="0" /> - <member name="e2" value="1" deprecated="1" /> - <member name="e3" value="2" /> - </enum> - <enum name="ErrorCodes2" type-name="ErrorCodes2" get-type="foo_error_codes2_get_type"> - <member name="e1" value="0" /> - </enum> - <errordomain name="Errors1" get-quark="foo_errors1_get_quark" codes="ErrorCodes1" /> - <errordomain name="Errors2" get-quark="foo_errors2_get_quark" codes="ErrorCodes2" /> - <function name="test1" symbol="test1"> - <return-type type="gboolean" /> - <parameters> - <parameter name="p1" type="gint" direction="in" allow-none="1" /> - <parameter name="p2" type="GError<Errors1,Errors2>*" transfer="full" direction="out" /> - </parameters> - </function> - </namespace> -</repository> diff --git a/tests/extended.gir b/tests/extended.gir deleted file mode 100644 index fadb4867..00000000 --- a/tests/extended.gir +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0"?> -<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"> - <include name="GObject" version="2.0"/> - <foofoo></foofoo> - <namespace name="extended" version="1.0"> - <frob> - <bar> - </bar> - </frob> - <constant name="KEY_FROB" value="31"> - <type name="int"/> - </constant> - </namespace> -</repository> diff --git a/tests/function.gir b/tests/function.gir deleted file mode 100644 index a32ccb16..00000000 --- a/tests/function.gir +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <boxed name="Boxed1" type-name="Boxed1" get-type="boxed1_get_type"> - </boxed> - <function name="test1" symbol="test1" deprecated="1"> - <return-type type="gboolean" /> - <parameters> - <parameter name="p1" type="Boxed1*" transfer="full" direction="in" allow-none="1" /> - <parameter name="p2" type="gboolean" direction="out" /> - </parameters> - </function> - <callback name="callback1" deprecated="1"> - <return-type type="gboolean" /> - <parameters> - <parameter name="p1" type="Boxed1*" transfer="full" direction="in" allow-none="1" /> - <parameter name="p2" type="gboolean" direction="out" /> - </parameters> - </callback> - </namespace> -</repository> diff --git a/tests/interface.gir b/tests/interface.gir deleted file mode 100644 index 4182a61c..00000000 --- a/tests/interface.gir +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <interface name="Iface1" glib:type-name="Iface1" glib:get-type="iface1_get_type"> - <requires> - <interface name="Iface2" /> - </requires> - <method name="method1" symbol="method1"> - <return-value transfer="full"> - <type name="Iface2"/> - </return-value> - <parameters> - <parameter name="param1" transfer="full" direction="in"> - <type name="Iface2"/> - </parameter> - </parameters> - </method> - <property name="prop1" readable="0" writable="0"> - <type name="int"/> - </property> - <glib:signal name="signal1" when="LAST"> - <return-value transfer="full"> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="obj" transfer="full" direction="in"> - <type name="Iface2"/> - </parameter> - </parameters> - </glib:signal> - <glib:signal name="signal2" when="FIRST" no-recurse="1" detailed="1" action="1" no-hooks="1"> - <return-value transfer="full"> - <type name="none"/> - </return-value> - <parameters> - <parameter name="obj" transfer="full" direction="in"> - <type name="Iface1"/> - </parameter> - </parameters> - </glib:signal> - <vfunc name="vfunc1" offset="10"> - <return-value transfer="full"> - <type name="Iface2"/> - </return-value> - <parameters> - <parameter name="param1" transfer="full" direction="in"> - <type name="Iface2"/> - </parameter> - </parameters> - </vfunc> - <constant name="constant1" value="42"> - <type name="gint"/> - </constant> - </interface> - <interface name="Iface2" glib:type-name="Iface2" glib:get-type="iface2_get_type"> - </interface> - </namespace> -</repository> diff --git a/tests/object.gir b/tests/object.gir deleted file mode 100644 index e0abed39..00000000 --- a/tests/object.gir +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<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"> - <include name="GObject" version="2.0"/> - <namespace name="object" version="1.0"> - <interface name="IFace1" glib:type-name="IFace1" glib:get-type="iface1_get_type"/> - <class name="Object1" parent="Object2" glib:type-name="Object1" glib:get-type="object1_get_type"> - <implements name="IFace1"/> - <property name="prop1" readable="0"> - <type name="int"/> - </property> - <glib:signal name="signal1" when="LAST"> - <return-value transfer-ownership="none"> - <type name="boolean"/> - </return-value> - <parameters> - <parameter name="obj" transfer-ownership="none"> - <type name="Object1"/> - </parameter> - </parameters> - </glib:signal> - <glib:signal name="signal2" when="FIRST" no-recurse="1" detailed="1" action="1" no-hooks="1"> - <return-value transfer-ownership="none"> - <type name="none"/> - </return-value> - <parameters> - <parameter name="obj" transfer-ownership="none"> - <type name="Object1"/> - </parameter> - </parameters> - </glib:signal> - <vfunc name="vfunc1" offset="20"> - <return-value transfer-ownership="none"> - <type name="Object2"/> - </return-value> - <parameters> - <parameter name="param1" transfer-ownership="none"> - <type name="Object1"/> - </parameter> - </parameters> - </vfunc> - <vfunc name="vfunc2" offset="24"> - <return-value transfer-ownership="none"> - <type name="Object2"/> - </return-value> - <parameters> - <parameter name="param1" transfer-ownership="none"> - <type name="Object1"/> - </parameter> - </parameters> - </vfunc> - </class> - <constant name="constant1" value="42"> - <type name="int"/> - </constant> - <interface name="Iface1" glib:type-name="Iface1" glib:get-type="iface1_get_type"/> - <class name="Object2" glib:type-name="Object2" glib:get-type="object2_get_type"/> - </namespace> -</repository> diff --git a/tests/struct.gir b/tests/struct.gir deleted file mode 100644 index 9ef963b6..00000000 --- a/tests/struct.gir +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<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="struct" version="1.0"> - <record name="FooStruct"> - <field name="foo_int" writable="1"> - <type name="int"/> - </field> - <field name="foo_int64" writable="1"> - <type name="int64"/> - </field> - <field name="foo_uint" writable="1"> - <type name="uint"/> - </field> - <field name="foo_uint64" writable="1"> - <type name="uint64"/> - </field> - <field name="string" writable="1"> - <type name="utf8"/> - </field> - </record> - <record name="FooStruct2"> - <field name="sub" writable="1"> - <type name="FooStruct"/> - </field> - <field name="string" writable="1"> - <type name="utf8"/> - </field> - </record> - </namespace> -</repository> diff --git a/tests/types.gir b/tests/types.gir deleted file mode 100644 index 36220ad7..00000000 --- a/tests/types.gir +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <function name="lart" symbol="lart"> - <return-type type="gboolean" /> - <parameters> - <parameter name="box" type="gint" transfer="full" direction="in" /> - <parameter name="val" type="gint" transfer="full" direction="inout" /> - <parameter name="w" type="GList<gint>" transfer="full" direction="in" /> - <parameter name="t" type="GHashTable<utf8,gint64>" transfer="full" direction="in" /> - </parameters> - </function> - </namespace> -</repository> diff --git a/tests/union.gir b/tests/union.gir deleted file mode 100644 index 6e123de8..00000000 --- a/tests/union.gir +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <union name="union1" type-name="UnionType1" get-type="union1_get_type"> - <discriminator offset="-4" type="gint" /> - <field name="field1" readable="1" writable="1" type="guint32" branch="0" /> - <field name="field1" readable="1" writable="1" type="gdouble" branch="1" /> - </union> - <union name="union2" type-name="UnionType1" get-type="union1_get_type"> - <field name="field1" readable="1" writable="1" type="guint32" /> - <field name="field1" readable="1" writable="1" type="gdouble" /> - </union> - </namespace> -</repository> diff --git a/tests/xref1.gir b/tests/xref1.gir deleted file mode 100644 index 17b9239f..00000000 --- a/tests/xref1.gir +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<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="Foo" version="1.0"> - <glib:boxed glib:name="Boxed" glib:type-name="FooBoxed" glib:get-type="foo_boxed_get_type"> - </glib:boxed> - <function name="test" symbol="foo_test"> - <return-value> - <type name="none"/> - </return-value> - <parameters> - <parameter name="p1" transfer="full" direction="in"> - <type name="Bar.Boxed"/> - </parameter> - </parameters> - </function> - </namespace> -</repository> diff --git a/tests/xref2.gir b/tests/xref2.gir deleted file mode 100644 index 0ee48368..00000000 --- a/tests/xref2.gir +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<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="Bar" version="1.0"> - <glib:boxed glib:name="Boxed" glib:type-name="BarBoxed" glib:get-type="bar_boxed_get_type"> - </glib:boxed> - <function name="test" symbol="bar_test"> - <return-value> - <type name="none"/> - </return-value> - <parameters> - <parameter name="p1" transfer="full" direction="in"> - <type name="Foo.Boxed"/> - </parameter> - </parameters> - </function> - </namespace> -</repository> |