[gobject-introspection] test: gi_marshalling_tests_array_gvariant_in
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] test: gi_marshalling_tests_array_gvariant_in
- Date: Mon, 17 Jan 2011 11:01:39 +0000 (UTC)
commit 89275d1ad513413f25100e765add3ff8335e6525
Author: Mikkel Kamstrup Erlandsen <mikkel kamstrup canonical com>
Date: Fri Jan 7 16:05:07 2011 +0100
test: gi_marshalling_tests_array_gvariant_in
A new test to expose a bug in pygobject
https://bugzilla.gnome.org/show_bug.cgi?id=638915
tests/gimarshallingtests.c | 14 ++++++++++++++
tests/gimarshallingtests.h | 2 ++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 527d169..c37aec4 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -1309,6 +1309,20 @@ gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s)
*utf8s = values;
}
+/**
+ * gi_marshalling_tests_array_gvariant_in:
+ * @variants: (array zero-terminated=1) (transfer none):
+ */
+GVariant **
+gi_marshalling_tests_array_gvariant_in (GVariant **variants)
+{
+ g_assert (variants != NULL);
+ g_assert_cmpint (g_variant_get_int32 (variants[0]), ==, 27);
+ g_assert_cmpstr (g_variant_get_string (variants[1], NULL), ==, "Hello");
+ g_assert (variants[2] == NULL);
+
+ return variants;
+}
/**
* gi_marshalling_tests_garray_int_none_return:
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 4d9923a..0d1763e 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -295,6 +295,8 @@ void gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s);
void gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s);
+GVariant **gi_marshalling_tests_array_gvariant_in (GVariant **variants);
+
/* GArray */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]