diff options
Diffstat (limited to 'tests/warn')
-rw-r--r-- | tests/warn/Makefile.am | 1 | ||||
-rw-r--r-- | tests/warn/invalid-constructor.h | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/warn/Makefile.am b/tests/warn/Makefile.am index 571ca4a3..7d81d9ef 100644 --- a/tests/warn/Makefile.am +++ b/tests/warn/Makefile.am @@ -6,6 +6,7 @@ TESTS = \ return-gobject.h \ invalid-array.h \ invalid-closure.h \ + invalid-constructor.h \ invalid-element-type.h \ invalid-method.h \ invalid-option.h \ diff --git a/tests/warn/invalid-constructor.h b/tests/warn/invalid-constructor.h new file mode 100644 index 00000000..a80d79ea --- /dev/null +++ b/tests/warn/invalid-constructor.h @@ -0,0 +1,18 @@ +#include "common.h" + +/** + * test_constructor_invalid_return: (constructor) + * + */ +int test_constructor_invalid_return(); + +// EXPECT:7: Warning: Test: test_constructor_invalid_return: Constructors must return an instance of their class + +/** + * test_constructor_invalid_return_pointer: (constructor) + * + */ +GClosure *test_constructor_invalid_return_pointer(); + +// EXPECT:15: Warning: Test: test_constructor_invalid_return_pointer: Constructors must belong to the same namespace as the class they belong to + |