summaryrefslogtreecommitdiff
path: root/tests/scanner/regress.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-11-06 12:42:11 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-11-06 12:45:04 +0100
commitd8e257464bd93ea502740169887297fa62925a16 (patch)
treef43cd0266e2413ff5ea85dc1fb9ae523d27f7ab6 /tests/scanner/regress.c
parent54a5ed77c9c1296c7709c80428dc41d535999798 (diff)
downloadgobject-introspection-d8e257464bd93ea502740169887297fa62925a16.tar.gz
tests: Add more regression tests for (not nullable)
On bug #719966, the question arose of whether parameters annotated with (element-type) but not (not nullable) are regarded as nullable or non-nullable. Add some new unit tests to Regress-1.0.gir to check the behaviour is as expected: annotating a parameter with (element-type) implicitly makes it non-nullable (unless also annotated with (nullable)). https://bugzilla.gnome.org/show_bug.cgi?id=757678
Diffstat (limited to 'tests/scanner/regress.c')
-rw-r--r--tests/scanner/regress.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 9a9ee679..fa481054 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -3042,6 +3042,30 @@ regress_func_obj_nullable_in (RegressTestObj *obj)
}
/**
+ * regress_test_obj_not_nullable_typed_gpointer_in:
+ * @obj: A #RegressTestObj
+ * @input: (type GObject): some #GObject
+ */
+void
+regress_test_obj_not_nullable_typed_gpointer_in (RegressTestObj *obj,
+ gpointer input)
+{
+}
+
+/**
+ * regress_test_obj_not_nullable_element_typed_gpointer_in:
+ * @obj: A #RegressTestObj
+ * @input: (element-type guint8) (array length=count): some uint8 array
+ * @count: length of @input
+ */
+void
+regress_test_obj_not_nullable_element_typed_gpointer_in (RegressTestObj *obj,
+ gpointer input,
+ guint count)
+{
+}
+
+/**
* regress_test_array_fixed_out_objects:
* @objs: (out) (array fixed-size=2) (transfer full): An array of #RegressTestObj
*/