summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/gimarshallingtests.c46
-rw-r--r--tests/gimarshallingtests.h6
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 2c826f07..92868016 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -1955,6 +1955,29 @@ gi_marshalling_tests_garray_utf8_full_return (void)
}
/**
+ * gi_marshalling_tests_garray_boxed_struct_full_return:
+ *
+ * Returns: (element-type GIMarshallingTestsBoxedStruct) (transfer full):
+ */
+GArray *
+gi_marshalling_tests_garray_boxed_struct_full_return (void)
+{
+ GArray *array = NULL;
+ static const glong long_values[] = { 42, 43, 44 };
+ gint i;
+
+ array = g_array_new (TRUE, TRUE, sizeof (GIMarshallingTestsBoxedStruct));
+ for (i = 0; i < 3; i++)
+ {
+ GIMarshallingTestsBoxedStruct *new_struct = gi_marshalling_tests_boxed_struct_new ();
+ new_struct->long_ = long_values[i];
+ g_array_append_val (array, *new_struct);
+ }
+
+ return array;
+}
+
+/**
* gi_marshalling_tests_garray_int_none_in:
* @array_: (element-type gint) (transfer none):
*/
@@ -2246,6 +2269,29 @@ gi_marshalling_tests_gptrarray_utf8_full_return (void)
}
/**
+ * gi_marshalling_tests_gptrarray_boxed_struct_full_return:
+ *
+ * Returns: (element-type GIMarshallingTestsBoxedStruct) (transfer full):
+ */
+GPtrArray *
+gi_marshalling_tests_gptrarray_boxed_struct_full_return (void)
+{
+ GPtrArray *parray = NULL;
+ static const glong long_values[] = { 42, 43, 44 };
+ gint i;
+
+ parray = g_ptr_array_new ();
+ for (i = 0; i < 3; i++)
+ {
+ GIMarshallingTestsBoxedStruct *new_struct = gi_marshalling_tests_boxed_struct_new ();
+ new_struct->long_ = long_values[i];
+ g_ptr_array_add (parray, (gpointer) new_struct);
+ }
+
+ return parray;
+}
+
+/**
* gi_marshalling_tests_gptrarray_utf8_none_in:
* @parray_: (element-type utf8) (transfer none):
*/
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 7837acba..d5357ec9 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -834,6 +834,9 @@ GArray *gi_marshalling_tests_garray_utf8_container_return (void);
_GI_TEST_EXTERN
GArray *gi_marshalling_tests_garray_utf8_full_return (void);
+_GI_TEST_EXTERN
+GArray *gi_marshalling_tests_garray_boxed_struct_full_return (void);
+
_GI_TEST_EXTERN
void gi_marshalling_tests_garray_int_none_in (GArray *array_);
@@ -884,6 +887,9 @@ GPtrArray *gi_marshalling_tests_gptrarray_utf8_container_return (void);
_GI_TEST_EXTERN
GPtrArray *gi_marshalling_tests_gptrarray_utf8_full_return (void);
+_GI_TEST_EXTERN
+GPtrArray *gi_marshalling_tests_gptrarray_boxed_struct_full_return (void);
+
_GI_TEST_EXTERN
void gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_);