summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-05-13 17:31:10 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-05-13 17:31:10 +0000
commiteb5d9a33e6e52dd6efb8432f265c2dfa68fbc480 (patch)
tree2c2a1f8b19f0d60617b9182a1cb2a28479593be3 /tests
parent22580d644fece9a3c6cfa661650bdf0bcc31b8ea (diff)
downloadgobject-introspection-eb5d9a33e6e52dd6efb8432f265c2dfa68fbc480.tar.gz
Update testcases.
2005-05-13 Matthias Clasen <mclasen@redhat.com> * tests/*: Update testcases. * src/generate.c (write_callable_info): Don't forget to write transfer and null-ok attributes for return types and parameters. * src/girepository.h: * src/ginfo.c (g_callable_info_may_return_null): New function to find out if a function may return NULL.
Diffstat (limited to 'tests')
-rw-r--r--tests/array.test6
-rw-r--r--tests/boxed.test12
-rw-r--r--tests/errors.test2
-rw-r--r--tests/function.test4
-rw-r--r--tests/interface.test8
-rw-r--r--tests/object.test6
-rw-r--r--tests/xref1.test2
-rw-r--r--tests/xref2.test2
8 files changed, 21 insertions, 21 deletions
diff --git a/tests/array.test b/tests/array.test
index bac29db9..671f8dcf 100644
--- a/tests/array.test
+++ b/tests/array.test
@@ -4,7 +4,7 @@
<function name="test1" symbol="test1">
<return-type type="gboolean" />
<parameters>
- <parameter name="p1" type="gchar*[length=1,zero-terminated=1]" direction="in" />
+ <parameter name="p1" type="gchar*[length=1,zero-terminated=1]" transfer="full" direction="in" />
<parameter name="p2" type="gint" direction="in" />
</parameters>
</function>
@@ -12,13 +12,13 @@
<return-type type="gboolean" />
<parameters>
<parameter name="p2" type="gint" direction="out" />
- <parameter name="p1" type="gchar*[length=0]" direction="out" />
+ <parameter name="p1" type="gchar*[length=0]" transfer="full" direction="out" />
</parameters>
</function>
<function name="test3" symbol="test3">
<return-type type="gboolean" />
<parameters>
- <parameter name="p1" type="gchar*[zero-terminated=1]" direction="in" />
+ <parameter name="p1" type="gchar*[zero-terminated=1]" transfer="full" direction="in" />
</parameters>
</function>
</namespace>
diff --git a/tests/boxed.test b/tests/boxed.test
index 4f5342fe..1c312f7b 100644
--- a/tests/boxed.test
+++ b/tests/boxed.test
@@ -6,17 +6,17 @@
<method name="frob_boxed1" symbol="frob_boxed1">
<return-type type="void" />
<parameters>
- <parameter name="box" type="boxed1*" direction="in" />
- <parameter name="w" type="GList<boxed2*>" direction="in" />
- <parameter name="t" type="GHashTable<gchar*,gint64>" direction="in" />
- <parameter name="e" type="GError<>" direction="out" />
+ <parameter name="box" type="boxed1*" transfer="full" direction="in" />
+ <parameter name="w" type="GList<boxed2*>" transfer="full" direction="in" />
+ <parameter name="t" type="GHashTable<gchar*,gint64>" transfer="full" direction="in" />
+ <parameter name="e" type="GError<>" transfer="full" direction="out" />
</parameters>
</method>
<method name="lart" symbol="lart">
<return-type type="gboolean" />
<parameters>
- <parameter name="box" type="boxed2*" direction="in" />
- <parameter name="val" type="gint*" direction="inout" />
+ <parameter name="box" type="boxed2*" transfer="full" direction="in" />
+ <parameter name="val" type="gint*" transfer="full" direction="inout" />
</parameters>
</method>
</boxed>
diff --git a/tests/errors.test b/tests/errors.test
index 4f4c9058..f36f862c 100644
--- a/tests/errors.test
+++ b/tests/errors.test
@@ -15,7 +15,7 @@
<return-type type="gboolean" />
<parameters>
<parameter name="p1" type="gint" direction="in" null-ok="1" />
- <parameter name="p2" type="GError<Errors1,Errors2>" direction="out" />
+ <parameter name="p2" type="GError<Errors1,Errors2>" transfer="full" direction="out" />
</parameters>
</function>
</namespace>
diff --git a/tests/function.test b/tests/function.test
index b810efc4..74691d38 100644
--- a/tests/function.test
+++ b/tests/function.test
@@ -6,14 +6,14 @@
<function name="test1" symbol="test1" deprecated="1">
<return-type type="gboolean" />
<parameters>
- <parameter name="p1" type="Boxed1*" direction="in" null-ok="1" />
+ <parameter name="p1" type="Boxed1*" transfer="full" direction="in" null-ok="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*" direction="in" null-ok="1" />
+ <parameter name="p1" type="Boxed1*" transfer="full" direction="in" null-ok="1" />
<parameter name="p2" type="gboolean" direction="out" />
</parameters>
</callback>
diff --git a/tests/interface.test b/tests/interface.test
index 2e6fe5fc..79094ca9 100644
--- a/tests/interface.test
+++ b/tests/interface.test
@@ -8,26 +8,26 @@
<method name="method1" symbol="method1">
<return-type type="Iface2*" transfer="full" />
<parameters>
- <parameter name="param1" type="Iface2*" direction="in" />
+ <parameter name="param1" type="Iface2*" transfer="full" direction="in" />
</parameters>
</method>
<property name="prop1" readable="0" writable="0" type="gint" />
<signal name="signal1" when="LAST">
<return-type type="gboolean" />
<parameters>
- <parameter name="obj" type="Iface1*" direction="in" />
+ <parameter name="obj" type="Iface1*" transfer="full" direction="in" />
</parameters>
</signal>
<signal name="signal2" when="FIRST" no-recurse="1" detailed="1" action="1" no-hooks="1">
<return-type type="void" />
<parameters>
- <parameter name="obj" type="Iface1*" direction="in" />
+ <parameter name="obj" type="Iface1*" transfer="full" direction="in" />
</parameters>
</signal>
<vfunc name="vfunc1">
<return-type type="Iface2*" transfer="full" />
<parameters>
- <parameter name="param1" type="Iface2*" direction="in" />
+ <parameter name="param1" type="Iface2*" transfer="full" direction="in" />
</parameters>
</vfunc>
<constant name="constant1" type="gint" value="42" />
diff --git a/tests/object.test b/tests/object.test
index 7b04e8ae..c280e81e 100644
--- a/tests/object.test
+++ b/tests/object.test
@@ -9,19 +9,19 @@
<signal name="signal1" when="LAST">
<return-type type="gboolean" />
<parameters>
- <parameter name="obj" type="Object1*" direction="in" />
+ <parameter name="obj" type="Object1*" transfer="full" direction="in" />
</parameters>
</signal>
<signal name="signal2" when="FIRST" no-recurse="1" detailed="1" action="1" no-hooks="1">
<return-type type="void" />
<parameters>
- <parameter name="obj" type="Object1*" direction="in" />
+ <parameter name="obj" type="Object1*" transfer="full" direction="in" />
</parameters>
</signal>
<vfunc name="vfunc1">
<return-type type="Object2*" transfer="full" />
<parameters>
- <parameter name="param1" type="Object1*" direction="in" />
+ <parameter name="param1" type="Object1*" transfer="full" direction="in" />
</parameters>
</vfunc>
<constant name="constant1" type="gint" value="42" />
diff --git a/tests/xref1.test b/tests/xref1.test
index 07b1b67b..bef65f6d 100644
--- a/tests/xref1.test
+++ b/tests/xref1.test
@@ -6,7 +6,7 @@
<function name="test" symbol="foo_test">
<return-type type="void" />
<parameters>
- <parameter name="p1" type="Bar.Boxed*" direction="in" />
+ <parameter name="p1" type="Bar.Boxed*" transfer="full" direction="in" />
</parameters>
</function>
</namespace>
diff --git a/tests/xref2.test b/tests/xref2.test
index 02d34d79..069c9c67 100644
--- a/tests/xref2.test
+++ b/tests/xref2.test
@@ -6,7 +6,7 @@
<function name="test" symbol="bar_test">
<return-type type="void" />
<parameters>
- <parameter name="p1" type="Foo.Boxed*" direction="in" />
+ <parameter name="p1" type="Foo.Boxed*" transfer="full" direction="in" />
</parameters>
</function>
</namespace>