summaryrefslogtreecommitdiff
path: root/tests/warn/invalid-constructor.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/warn/invalid-constructor.h')
-rw-r--r--tests/warn/invalid-constructor.h18
1 files changed, 18 insertions, 0 deletions
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
+