[gobject-introspection] gimarshallingtests: Add test for GValue pass-by-reference
- From: Simon Feltman <sfeltman src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] gimarshallingtests: Add test for GValue pass-by-reference
- Date: Wed, 3 Jul 2013 09:13:40 +0000 (UTC)
commit 049c7fd7cf1faaf1ddcd6ed5445dfaceefe70295
Author: Simon Feltman <sfeltman src gnome org>
Date: Tue Jul 2 19:13:53 2013 -0700
gimarshallingtests: Add test for GValue pass-by-reference
https://bugzilla.gnome.org/show_bug.cgi?id=701058
tests/gimarshallingtests.c | 14 ++++++++++++++
tests/gimarshallingtests.h | 1 +
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 1998161..7d39254 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 33f3b3e..3b436f0 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]