diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-03-17 23:03:46 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2013-03-18 00:53:42 -0700 |
commit | b5cd5c07a1b059d3d90d86d04426d72eedcfaa39 (patch) | |
tree | 3ce54574eae619d013e539287e477769f301b506 /tests/gimarshallingtests.c | |
parent | f196c61b1691bb063a27289438c6ecdf247af798 (diff) | |
download | gobject-introspection-b5cd5c07a1b059d3d90d86d04426d72eedcfaa39.tar.gz |
gimarshallingtests: Add tests for enum returned from vfunc
Add vfuncs and methods for an object returning an enum or
using one as an output argument.
https://bugzilla.gnome.org/show_bug.cgi?id=637832
Diffstat (limited to 'tests/gimarshallingtests.c')
-rw-r--r-- | tests/gimarshallingtests.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 2851c4d1..1998161b 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -4350,6 +4350,34 @@ gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *sel return ret; } +/** + * gi_marshalling_tests_object_vfunc_return_enum: + */ +GIMarshallingTestsEnum +gi_marshalling_tests_object_vfunc_return_enum (GIMarshallingTestsObject *self) +{ + /* make sure that local variables don't get smashed */ + GIMarshallingTestsEnum return_value; + glong local = 0x12345678; + return_value = GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_return_enum (self); + g_assert_cmpint (local, ==, 0x12345678); + return return_value; +} + +/** + * gi_marshalling_tests_object_vfunc_out_enum: + * @_enum: (out): + */ +void +gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum) +{ + /* make sure that local variables don't get smashed */ + gulong local = 0x12345678; + GI_MARSHALLING_TESTS_OBJECT_GET_CLASS (self)->vfunc_out_enum (self, _enum); + g_assert_cmpint (local, ==, 0x12345678); +} + + /* NOTE: * * The following (get_ref_info_for_*) methods are designed to call vfuncs related |