[gobject-introspection] gimarshallingtests: Add method taking a GParamSpec argument



commit 5e4ddbcb8eacede04d5ade9e630d2efe29c022a0
Author: Martin Pitt <martinpitt gnome org>
Date:   Mon Jan 14 12:34:06 2013 +0100

    gimarshallingtests: Add method taking a GParamSpec argument
    
    Add gi_marshalling_tests_param_spec_in_bool(), supplementing the already
    existing tests for a GParamSpec out argument and return value.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682355

 tests/gimarshallingtests.c |   15 +++++++++++++--
 tests/gimarshallingtests.h |    1 +
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index e855981..a81e4d8 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -4699,6 +4699,17 @@ gi_marshalling_tests_filename_list_return (void)
 }
 
 /**
+ * gi_marshalling_tests_param_spec_in_bool:
+ */
+void
+gi_marshalling_tests_param_spec_in_bool (const GParamSpec *param)
+{
+    g_assert (G_IS_PARAM_SPEC (param));
+    g_assert_cmpint (G_PARAM_SPEC_TYPE (param), ==, G_TYPE_BOOLEAN);
+    g_assert_cmpstr (g_param_spec_get_name(param), ==, "mybool");
+}
+
+/**
  * gi_marshalling_tests_param_spec_return:
  *
  * Returns: (transfer full): a #GParamSpec
@@ -4706,7 +4717,7 @@ gi_marshalling_tests_filename_list_return (void)
 GParamSpec *
 gi_marshalling_tests_param_spec_return (void)
 {
-  return g_param_spec_string ("test-param", "test", "This is a test", "42", G_PARAM_READABLE);
+    return g_param_spec_string ("test-param", "test", "This is a test", "42", G_PARAM_READABLE);
 }
 
 /**
@@ -4716,7 +4727,7 @@ gi_marshalling_tests_param_spec_return (void)
 void
 gi_marshalling_tests_param_spec_out(GParamSpec **param)
 {
-  *param = g_param_spec_string("test-param", "test", "This is a test", "42", G_PARAM_READABLE);
+    *param = g_param_spec_string("test-param", "test", "This is a test", "42", G_PARAM_READABLE);
 }
 
 
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 74090f0..10179c6 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -1003,6 +1003,7 @@ void gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **d
 GError *gi_marshalling_tests_gerror_return(void);
 
 /* GParamSpec */
+void gi_marshalling_tests_param_spec_in_bool(const GParamSpec *param);
 GParamSpec *gi_marshalling_tests_param_spec_return (void);
 void gi_marshalling_tests_param_spec_out(GParamSpec **param);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]