diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2011-02-04 11:33:26 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2011-02-22 17:10:08 +0100 |
commit | a988cd414ce6aa40f1d77fcfa2d5721d169b5927 (patch) | |
tree | d025f82a9c9cc2613c2ce9f5120e66b48711e387 /tests/warn | |
parent | f49f46f0c2b4ab2c7e33598596e6df72bd960c19 (diff) | |
download | gobject-introspection-a988cd414ce6aa40f1d77fcfa2d5721d169b5927.tar.gz |
Add warnings for the (method) annotation
https://bugzilla.gnome.org/show_bug.cgi?id=641347
Diffstat (limited to 'tests/warn')
-rw-r--r-- | tests/warn/Makefile.am | 1 | ||||
-rw-r--r-- | tests/warn/invalid-method.h | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/warn/Makefile.am b/tests/warn/Makefile.am index 8b44cfcb..571ca4a3 100644 --- a/tests/warn/Makefile.am +++ b/tests/warn/Makefile.am @@ -7,6 +7,7 @@ TESTS = \ invalid-array.h \ invalid-closure.h \ invalid-element-type.h \ + invalid-method.h \ invalid-option.h \ invalid-out.h \ invalid-transfer.h \ diff --git a/tests/warn/invalid-method.h b/tests/warn/invalid-method.h new file mode 100644 index 00000000..26d528ac --- /dev/null +++ b/tests/warn/invalid-method.h @@ -0,0 +1,26 @@ +#include "common.h" + +/** + * test_method_no_parameters: (method) + * + */ +void test_method_no_parameters(); + +// EXPECT:7: Warning: Test: test_method_no_parameters: Methods must have parameters + +/** + * test_method_invalid_first_parameter: (method): + * + */ +void test_method_invalid_first_parameter(int param); + +// EXPECT:15: Warning: Test: test_method_invalid_first_parameter: Methods must have a pointer as their first parameter + +/** + * test_method_invalid_namespace: (method): + * + */ +void test_method_invalid_namespace(GClosure *param); + +// EXPECT:23: Warning: Test: test_method_invalid_namespace: Methods must belong to the same namespace as the class they are into + |