diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-07-02 19:13:53 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2013-07-02 19:13:53 -0700 |
commit | 049c7fd7cf1faaf1ddcd6ed5445dfaceefe70295 (patch) | |
tree | 31bb658059afa48d0e3fad1a5b6e9d2421071c37 | |
parent | 487411db1162323522572f3aebfc423e1706cb69 (diff) | |
download | gobject-introspection-049c7fd7cf1faaf1ddcd6ed5445dfaceefe70295.tar.gz |
gimarshallingtests: Add test for GValue pass-by-reference
https://bugzilla.gnome.org/show_bug.cgi?id=701058
-rw-r--r-- | tests/gimarshallingtests.c | 14 | ||||
-rw-r--r-- | tests/gimarshallingtests.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 1998161b..7d392544 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -3138,6 +3138,20 @@ gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type) } /** + * gi_marshalling_tests_gvalue_in_with_modification: + * @value: (transfer none): + * + * Expects a GValue passed by reference which is then modified by + * this function. + */ +void +gi_marshalling_tests_gvalue_in_with_modification (GValue *value) +{ + g_assert_cmpint (g_value_get_int (value), ==, 42); + g_value_set_int (value, 24); +} + +/** * gi_marshalling_tests_gvalue_in_enum: * @value: (transfer none): */ diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h index 33f3b3e9..3b436f0c 100644 --- a/tests/gimarshallingtests.h +++ b/tests/gimarshallingtests.h @@ -545,6 +545,7 @@ GValue *gi_marshalling_tests_gvalue_return (void); void gi_marshalling_tests_gvalue_in (GValue *value); void gi_marshalling_tests_gvalue_int64_in (GValue *value); void gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type); +void gi_marshalling_tests_gvalue_in_with_modification (GValue *value); void gi_marshalling_tests_gvalue_in_enum (GValue *value); |