diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/array.test | 29 | ||||
-rw-r--r-- | tests/boxed.test | 41 | ||||
-rw-r--r-- | tests/constant.test | 7 | ||||
-rw-r--r-- | tests/enum.test | 7 | ||||
-rw-r--r-- | tests/errors.test | 7 | ||||
-rw-r--r-- | tests/function.test | 7 | ||||
-rw-r--r-- | tests/gobject.test | 7 | ||||
-rw-r--r-- | tests/interface.test | 7 | ||||
-rw-r--r-- | tests/invoke/Makefile.am | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/invoke/testfns.gir (renamed from tests/invoke/testfns.xml) | 24 | ||||
-rw-r--r-- | tests/object.test | 7 | ||||
-rw-r--r-- | tests/parser/Makefile.am | 4 | ||||
-rw-r--r-- | tests/struct.test | 7 | ||||
-rw-r--r-- | tests/types.test | 7 | ||||
-rw-r--r-- | tests/union.test | 7 | ||||
-rw-r--r-- | tests/xref1.test | 7 | ||||
-rw-r--r-- | tests/xref2.test | 7 |
17 files changed, 118 insertions, 74 deletions
diff --git a/tests/array.test b/tests/array.test index f204389b..8d392c29 100644 --- a/tests/array.test +++ b/tests/array.test @@ -1,25 +1,28 @@ <?xml version="1.0"?> -<api 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"> - <function name="test1" symbol="test1"> - <return-type type="gboolean" /> + <function name="test1" c:identifier="test1"> + <return-type c:type="gboolean" /> <parameters> - <parameter name="p1" type="guint8[length=1,zero-terminated=1]" transfer="full" direction="in" /> - <parameter name="p2" type="gint" direction="in" /> + <parameter name="p1" c:type="guint8[length=1,zero-terminated=1]" transfer="full" direction="in" /> + <parameter name="p2" c:type="gint" direction="in" /> </parameters> </function> - <function name="test2" symbol="test2"> - <return-type type="gboolean" /> + <function name="test2" c:identifier="test2"> + <return-type c:type="gboolean" /> <parameters> - <parameter name="p2" type="gint" direction="out" /> - <parameter name="p1" type="guint8[length=0]" transfer="full" direction="out" /> + <parameter name="p2" c:type="gint" direction="out" /> + <parameter name="p1" c:type="guint8[length=0]" transfer="full" direction="out" /> </parameters> </function> - <function name="test3" symbol="test3"> - <return-type type="gboolean" /> + <function name="test3" c:identifier="test3"> + <return-type c:type="gboolean" /> <parameters> - <parameter name="p1" type="guint8[zero-terminated=1]" transfer="full" direction="in" /> + <parameter name="p1" c:type="guint8[zero-terminated=1]" transfer="full" direction="in" /> </parameters> </function> </namespace> -</api> +</repository> diff --git a/tests/boxed.test b/tests/boxed.test index 29ae8854..466afa15 100644 --- a/tests/boxed.test +++ b/tests/boxed.test @@ -1,35 +1,38 @@ <?xml version="1.0"?> -<api 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"> <boxed name="boxed1" type-name="BoxedType1" get-type="boxed1_get_type" deprecated="1"> - <field name="field1" readable="1" writable="1" offset="0" type="guint32" /> - <field name="field2" readable="1" writable="1" offset="4" type="guint32" /> - <field name="field3" readable="1" writable="1" offset="8" type="guint32" /> - <method name="frob_boxed1" symbol="frob_boxed1"> - <return-type type="void" /> + <field name="field1" readable="1" writable="1" offset="0" c:type="guint32" /> + <field name="field2" readable="1" writable="1" offset="4" c:type="guint32" /> + <field name="field3" readable="1" writable="1" offset="8" c:type="guint32" /> + <method name="frob_boxed1" c:identifier="frob_boxed1"> + <return-type c:type="void" /> <parameters> - <parameter name="box" type="boxed1*" transfer="full" direction="in" /> - <parameter name="w" type="GList<boxed2*>*" transfer="full" direction="in" /> - <parameter name="t" type="GHashTable<utf8,gint64>*" transfer="full" direction="in" /> - <parameter name="e" type="GError*" transfer="full" direction="out" /> + <parameter name="box" c:type="boxed1*" transfer="full" direction="in" /> + <parameter name="w" c:type="GList<boxed2*>*" transfer="full" direction="in" /> + <parameter name="t" c:type="GHashTable<utf8,gint64>*" transfer="full" direction="in" /> + <parameter name="e" c:type="GError*" transfer="full" direction="out" /> </parameters> </method> - <method name="lart" symbol="lart"> - <return-type type="gboolean" /> + <method name="lart" c:identifier="lart"> + <return-type c:type="gboolean" /> <parameters> - <parameter name="box" type="boxed2*" transfer="full" direction="in" /> - <parameter name="val" type="gint*" transfer="full" direction="inout" /> + <parameter name="box" c:type="boxed2*" transfer="full" direction="in" /> + <parameter name="val" c:type="gint*" transfer="full" direction="inout" /> </parameters> </method> </boxed> - <function name="freefunc" symbol="freefunc" deprecated="1"> - <return-type type="gint" /> + <function name="freefunc" c:identifier="freefunc" deprecated="1"> + <return-type c:type="gint" /> <parameters> - <parameter name="v1" type="gint" direction="in" /> - <parameter name="val2" type="gint" direction="in" /> + <parameter name="v1" c:type="gint" direction="in" /> + <parameter name="val2" c:type="gint" direction="in" /> </parameters> </function> <boxed name="boxed2" type-name="BoxedType2" get-type="boxed2_get_type" deprecated="1"> </boxed> </namespace> -</api> +</repository> diff --git a/tests/constant.test b/tests/constant.test index ed3671c5..f5da5358 100644 --- a/tests/constant.test +++ b/tests/constant.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <constant name="constant1" type="gint" value="42" /> <constant name="constant2" type="guint" value="42" /> @@ -7,4 +10,4 @@ <constant name="constant4" type="gint32" value="42" /> <constant name="constant5" type="gfloat" value="42.000000" /> </namespace> -</api> +</repository> diff --git a/tests/enum.test b/tests/enum.test index 1e056248..f91e6a95 100644 --- a/tests/enum.test +++ b/tests/enum.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <enum name="Enum1" type-name="FooEnum" get-type="foo_enum_get_type"> <member name="value1" value="0" /> @@ -17,4 +20,4 @@ <member name="value3" value="2" /> </enum> </namespace> -</api> +</repository> diff --git a/tests/errors.test b/tests/errors.test index ac67c369..206640f2 100644 --- a/tests/errors.test +++ b/tests/errors.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <enum name="ErrorCodes1" type-name="ErrorCodes1" get-type="foo_error_codes1_get_type"> <member name="e1" value="0" /> @@ -19,4 +22,4 @@ </parameters> </function> </namespace> -</api> +</repository> diff --git a/tests/function.test b/tests/function.test index 74691d38..cabeb2e8 100644 --- a/tests/function.test +++ b/tests/function.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <boxed name="Boxed1" type-name="Boxed1" get-type="boxed1_get_type"> </boxed> @@ -18,4 +21,4 @@ </parameters> </callback> </namespace> -</api> +</repository> diff --git a/tests/gobject.test b/tests/gobject.test index 4715e26a..aa4aa3ae 100644 --- a/tests/gobject.test +++ b/tests/gobject.test @@ -1,7 +1,10 @@ <?xml version="1.0"?> -<api 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="GObject"> <object name="GObject" type-name="GObject" get-type="g_object_get_type"> </object> </namespace> -</api> +</repository> diff --git a/tests/interface.test b/tests/interface.test index 08921bce..35ea45eb 100644 --- a/tests/interface.test +++ b/tests/interface.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <interface name="Iface1" type-name="Iface1" get-type="iface1_get_type"> <requires> @@ -35,4 +38,4 @@ <interface name="Iface2" type-name="Iface2" get-type="iface2_get_type"> </interface> </namespace> -</api> +</repository> diff --git a/tests/invoke/Makefile.am b/tests/invoke/Makefile.am index b56ca4dc..fa83d7be 100644 --- a/tests/invoke/Makefile.am +++ b/tests/invoke/Makefile.am @@ -16,11 +16,11 @@ testfns_la_LIBADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository. BUILT_SOURCES = testfns-metadata.c test.repo CLEANFILES = testfns-metadata.c test.repo -testfns-metadata.c: testfns.xml $(top_builddir)/tools/g-idl-compiler - $(top_builddir)/tools/g-idl-compiler $(srcdir)/testfns.xml -o testfns-metadata.c +testfns-metadata.c: testfns.gir $(top_builddir)/tools/g-ir-compiler + $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler $(srcdir)/testfns.gir -o testfns-metadata.c -test.repo: testfns.xml - $(top_builddir)/tools/g-idl-compiler --shared-library testfns.la $< --raw -o $@ +test.repo: testfns.gir + $(CHECK_DEBUG) $(top_builddir)/tools/g-ir-compiler --shared-library testfns.la $< --raw -o $@ invoke_SOURCES = invoke.c invoke_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository @@ -28,6 +28,6 @@ invoke_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la TESTS = invoke invoke-namespace-find.sh -EXTRA_DIST = invoke-namespace-find.sh testfns.xml +EXTRA_DIST = invoke-namespace-find.sh testfns.gir TESTS_ENVIRONMENT = GIREPOPATH="." diff --git a/tests/invoke/testfns.xml b/tests/invoke/testfns.gir index 7997bfa8..d6cd3340 100644..100755 --- a/tests/invoke/testfns.xml +++ b/tests/invoke/testfns.gir @@ -1,15 +1,17 @@ <?xml version="1.0"?> -<api 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="test"> - - <function name="test1" symbol="test1"> + <function name="test1" c:identifier="test1"> <return-type type="gint"/> <parameters> <parameter name="in" type="gint" direction="in"/> </parameters> </function> - <function name="test2" symbol="test2"> + <function name="test2" c:identifier="test2"> <return-type type="void"/> <parameters> <parameter name="in" type="gint" direction="in"/> @@ -17,21 +19,21 @@ </parameters> </function> - <function name="test3" symbol="test3"> + <function name="test3" c:identifier="test3"> <return-type type="void"/> <parameters> <parameter name="inout" type="gint" direction="inout"/> </parameters> </function> - <function name="test4" symbol="test4"> + <function name="test4" c:identifier="test4"> <return-type type="void"/> <parameters> <parameter name="blurb" type="gchar*" direction="in"/> </parameters> </function> - <function name="test5" symbol="test5"> + <function name="test5" c:identifier="test5"> <return-type type="void"/> <parameters> <parameter name="blurb" type="gchar*" direction="out" transfer="full"/> @@ -39,7 +41,7 @@ </parameters> </function> - <function name="test6" symbol="test6"> + <function name="test6" c:identifier="test6"> <return-type type="gint"/> <parameters> <parameter name="list" type="GList<gint>*" direction="in"/> @@ -47,16 +49,16 @@ </function> - <function name="test7" symbol="test7"> + <function name="test7" c:identifier="test7"> <return-type type="utf8" transfer="full"/> <parameters> <parameter name="list" type="GList<utf8>*" direction="in"/> </parameters> </function> - <function name="broken" symbol="broken"> + <function name="broken" c:identifier="broken"> <return-type type="void"/> </function> </namespace> -</api> +</repository> diff --git a/tests/object.test b/tests/object.test index d0f26bc1..394c02aa 100644 --- a/tests/object.test +++ b/tests/object.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <object name="Object1" parent="Object2" type-name="Object1" get-type="object1_get_type"> <implements> @@ -37,4 +40,4 @@ <object name="Object2" parent="GObject.GObject" type-name="Object2" get-type="object2_get_type"> </object> </namespace> -</api> +</repository> diff --git a/tests/parser/Makefile.am b/tests/parser/Makefile.am index 93c7d324..1debff3f 100644 --- a/tests/parser/Makefile.am +++ b/tests/parser/Makefile.am @@ -20,7 +20,7 @@ EXTRA_DIST = utility-expected.gir Foo-expected.gir SCANNER = $(top_srcdir)/tools/g-ir-scanner utility.gir: libutility.la utility.h $(SCANNER) - @$(SCANNER) -v \ + @$(CHECK_DEBUG) $(SCANNER) -v \ --include=$(top_srcdir)/gir/gobject-2.0.gir \ --library=libutility.la \ --namespace=utility \ @@ -29,7 +29,7 @@ utility.gir: libutility.la utility.h $(SCANNER) --output $@ Foo.gir: libfoo.la foo-object.h $(SCANNER) - @$(SCANNER) -v \ + @$(CHECK_DEBUG) $(SCANNER) -v \ --include=$(top_srcdir)/gir/gobject-2.0.gir \ --include=$(top_builddir)/tests/parser/utility.gir \ --library=libfoo.la \ diff --git a/tests/struct.test b/tests/struct.test index 3596eb18..e94a4352 100644 --- a/tests/struct.test +++ b/tests/struct.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <struct name="FooStruct"> <field name="foo_int" readable="1" writable="1" offset="0" type="gint" /> @@ -13,4 +16,4 @@ <field name="string" readable="1" writable="1" offset="24" type="utf8" /> </struct> </namespace> -</api> +</repository> diff --git a/tests/types.test b/tests/types.test index e08d67a4..1c5b9028 100644 --- a/tests/types.test +++ b/tests/types.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <function name="lart" symbol="lart"> <return-type type="gboolean" /> @@ -11,4 +14,4 @@ </parameters> </function> </namespace> -</api> +</repository> diff --git a/tests/union.test b/tests/union.test index 329512e1..9c4ae61a 100644 --- a/tests/union.test +++ b/tests/union.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <union name="union1" type-name="UnionType1" get-type="union1_get_type"> <discriminator offset="-4" type="gint" /> @@ -11,4 +14,4 @@ <field name="field1" readable="1" writable="1" offset="0" type="gdouble" /> </union> </namespace> -</api> +</repository> diff --git a/tests/xref1.test b/tests/xref1.test index bef65f6d..8eb57af6 100644 --- a/tests/xref1.test +++ b/tests/xref1.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <boxed name="Boxed" type-name="FooBoxed" get-type="foo_boxed_get_type"> </boxed> @@ -10,4 +13,4 @@ </parameters> </function> </namespace> -</api> +</repository> diff --git a/tests/xref2.test b/tests/xref2.test index 069c9c67..053e3223 100644 --- a/tests/xref2.test +++ b/tests/xref2.test @@ -1,5 +1,8 @@ <?xml version="1.0"?> -<api 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"> <boxed name="Boxed" type-name="BarBoxed" get-type="bar_boxed_get_type"> </boxed> @@ -10,4 +13,4 @@ </parameters> </function> </namespace> -</api> +</repository> |