summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@gnome.org>2015-09-27 13:06:49 -0500
committerMichael Catanzaro <mcatanzaro@gnome.org>2015-09-27 13:06:56 -0500
commit232f3c831260f596e36159112292897962a505b4 (patch)
treebfa8aae73980843ccbb3ddc50ff79193550a4447 /tests
parent5ae7bd58b6266997b61d897ad6562118eeb59210 (diff)
downloadgobject-introspection-232f3c831260f596e36159112292897962a505b4.tar.gz
Revert "scanner: Warn and ignore on incorrect transfer annotations"
It broke at least atk and mutter. This reverts commit 5ae7bd58b6266997b61d897ad6562118eeb59210.
Diffstat (limited to 'tests')
-rw-r--r--tests/gimarshallingtests.c2
-rw-r--r--tests/scanner/Regress-1.0-expected.gir2
-rw-r--r--tests/warn/invalid-transfer.h32
3 files changed, 6 insertions, 30 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 69311de7..76beb92e 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -3409,7 +3409,7 @@ glong
/**
* gi_marshalling_tests_pointer_in_return:
*
- * Returns: The same pointer
+ * Returns: (transfer none): The same pointer
*/
gpointer
gi_marshalling_tests_pointer_in_return (gpointer pointer)
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index bc3d29dc..aeb3fdbc 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -1461,7 +1461,7 @@ uses a C sugar return type.</doc>
c:identifier="regress_foo_object_new_cookie"
introspectable="0">
<doc xml:space="preserve">Not sure why this test is here...</doc>
- <return-value transfer-ownership="none">
+ <return-value>
<type name="FooObjectCookie" c:type="RegressFooObjectCookie"/>
</return-value>
<parameters>
diff --git a/tests/warn/invalid-transfer.h b/tests/warn/invalid-transfer.h
index 054bb768..ec43f2ac 100644
--- a/tests/warn/invalid-transfer.h
+++ b/tests/warn/invalid-transfer.h
@@ -1,36 +1,12 @@
-#include "common.h"
-
-typedef char TestChar;
/**
* test_transfer_invalid:
* @param: (transfer):
* @param2: (transfer invalid):
* @param3: (transfer full foo):
- * @param4: (transfer full):
- * @param5: (transfer full):
- * @param6: (transfer full):
- * @param7: (transfer container):
- * @param8: (transfer floating):
- */
-void test_transfer_invalid(GObject *param, GObject *param2, GObject *param3,
- char param4, TestChar param5, GType param6,
- GObject *param7, GDateTime *param8);
-
-// EXPECT:7: Warning: Test: "transfer" annotation needs one option, none given
-// EXPECT:8: Warning: Test: invalid "transfer" annotation option: "invalid"
-// EXPECT:9: Warning: Test: "transfer" annotation needs one option, 2 given
-// EXPECT:10: Warning: Test: invalid "transfer" annotation: only valid for array, struct, union, boxed, object and interface types
-// EXPECT:11: Warning: Test: invalid "transfer" annotation: only valid for array, struct, union, boxed, object and interface types
-// EXPECT:12: Warning: Test: invalid "transfer" annotation: only valid for array, struct, union, boxed, object and interface types
-// EXPECT:13: Warning: Test: invalid "transfer" annotation: only valid for container types
-// EXPECT:14: Warning: Test: invalid "transfer" annotation: only valid for object and interface types
-
-/**
- * test_transfer_return_invalid:
- *
- * Returns: (transfer full):
*/
-char test_transfer_return_invalid (void);
+void test_transfer_invalid(int param, int param2, int param3);
-// EXPECT:32: Warning: Test: invalid "transfer" annotation: only valid for array, struct, union, boxed, object and interface types
+// EXPECT:4: Warning: Test: "transfer" annotation needs one option, none given
+// EXPECT:5: Warning: Test: invalid "transfer" annotation option: "invalid"
+// EXPECT:6: Warning: Test: "transfer" annotation needs one option, 2 given