summaryrefslogtreecommitdiff
path: root/tests/gimarshallingtests.c
diff options
context:
space:
mode:
authorIgnacio Casal Quinteiro <icq@gnome.org>2011-01-19 12:07:49 +0100
committerIgnacio Casal Quinteiro <icq@gnome.org>2011-01-19 12:07:49 +0100
commit639558ad4138dcc228ff898430f8e4c2a29b3ae9 (patch)
tree01175b643cbe72655148d736e8af34725a89f8ff /tests/gimarshallingtests.c
parentf86575f337c6dce9a67b606712395d83bf8bfb92 (diff)
downloadgobject-introspection-639558ad4138dcc228ff898430f8e4c2a29b3ae9.tar.gz
[tests] add tests for guint8 arrays
* guint8 can be interpreted as array characters that can be memcpyied during marshalling so add a test to check if we are correctly handling this codepath
Diffstat (limited to 'tests/gimarshallingtests.c')
-rw-r--r--tests/gimarshallingtests.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index c37aec49..0960bff2 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -1225,6 +1225,20 @@ gi_marshalling_tests_array_in (const gint *ints, gint length)
}
/**
+ * gi_marshalling_tests_array_uint8_in:
+ * @chars: (array length=length):
+ */
+void
+gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length)
+{
+ g_assert(length == 4);
+ g_assert(chars[0] == 'a');
+ g_assert(chars[1] == 'b');
+ g_assert(chars[2] == 'c');
+ g_assert(chars[3] == 'd');
+}
+
+/**
* gi_marshalling_tests_array_out:
* @ints: (out) (array length=length) (transfer none):
*/