gimarshallingtests: Add method taking a GParamSpec argument
authorMartin Pitt <martinpitt@gnome.org>
Mon, 14 Jan 2013 11:34:06 +0000 (12:34 +0100)
committerMartin Pitt <martinpitt@gnome.org>
Mon, 14 Jan 2013 11:34:06 +0000 (12:34 +0100)
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
tests/gimarshallingtests.h

index e855981..a81e4d8 100644 (file)
@@ -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);
 }
 
 
index 74090f0..10179c6 100644 (file)
@@ -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);