From 5847211eb5184819d5f56d12bf4a275570b6516a Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 22 Jan 2012 03:32:44 -0500 Subject: [PATCH] tests: Add more interesting marshalling tests for GTypes https://bugzilla.gnome.org/show_bug.cgi?id=668426 --- tests/gimarshallingtests.c | 23 +++++++++++++++++++++++ tests/gimarshallingtests.h | 6 ++++++ 2 files changed, 29 insertions(+) diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 712e508..5eb3388 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -995,12 +995,25 @@ gi_marshalling_tests_gtype_return (void) return G_TYPE_NONE; } +GType +gi_marshalling_tests_gtype_string_return (void) +{ + return G_TYPE_STRING; +} + void gi_marshalling_tests_gtype_in (GType gtype) { g_assert(gtype == G_TYPE_NONE); } +void +gi_marshalling_tests_gtype_string_in (GType gtype) +{ + g_assert(gtype == G_TYPE_STRING); +} + + /** * gi_marshalling_tests_gtype_out: * @gtype: (out): @@ -1012,6 +1025,16 @@ gi_marshalling_tests_gtype_out (GType *gtype) } /** + * gi_marshalling_tests_gtype_string_out: + * @gtype: (out): + */ +void +gi_marshalling_tests_gtype_string_out (GType *gtype) +{ + *gtype = G_TYPE_STRING; +} + +/** * gi_marshalling_tests_gtype_inout: * @gtype: (inout): */ diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index e80a0e5..23a03b2 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -236,10 +236,16 @@ void gi_marshalling_tests_time_t_inout (time_t *time_t_); GType gi_marshalling_tests_gtype_return (void); +GType gi_marshalling_tests_gtype_string_return (void); + void gi_marshalling_tests_gtype_in (GType gtype); +void gi_marshalling_tests_gtype_string_in (GType gtype); + void gi_marshalling_tests_gtype_out (GType *gtype); +void gi_marshalling_tests_gtype_string_out (GType *gtype); + void gi_marshalling_tests_gtype_inout (GType *gtype); -- 2.7.4