summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Kamstrup Erlandsen <mikkel.kamstrup@canonical.com>2011-01-07 16:05:07 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2011-01-17 12:00:48 +0100
commit89275d1ad513413f25100e765add3ff8335e6525 (patch)
treecedcba354bbdf95edd2cac400d55267fe13e38aa
parent8896eb04d9cb9f8792da34ae9814c7d7b97a9729 (diff)
downloadgobject-introspection-89275d1ad513413f25100e765add3ff8335e6525.tar.gz
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
-rw-r--r--tests/gimarshallingtests.c14
-rw-r--r--tests/gimarshallingtests.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 527d1690..c37aec49 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 4d9923aa..0d1763ef 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 */