gimarshallingtests: Add in/out int64 GValue method arguments
authorMartin Pitt <martinpitt@gnome.org>
Mon, 10 Sep 2012 14:19:41 +0000 (16:19 +0200)
committerMartin Pitt <martinpitt@gnome.org>
Mon, 10 Sep 2012 14:28:59 +0000 (16:28 +0200)
See https://bugzilla.gnome.org/show_bug.cgi?id=683596

tests/gimarshallingtests.c
tests/gimarshallingtests.h

index dec0438..3eb6e07 100644 (file)
@@ -2945,6 +2945,16 @@ gi_marshalling_tests_gvalue_in (GValue *value)
 }
 
 /**
+ * gi_marshalling_tests_gvalue_int64_in:
+ * @value: (transfer none):
+ */
+void
+gi_marshalling_tests_gvalue_int64_in (GValue *value)
+{
+    g_assert_cmpint(g_value_get_int64(value), ==, G_MAXINT64);
+}
+
+/**
  * gi_marshalling_tests_gvalue_in_with_type:
  * @value: (transfer none):
  * @type:
@@ -2984,6 +2994,24 @@ gi_marshalling_tests_gvalue_out (GValue **value)
 }
 
 /**
+ * gi_marshalling_tests_gvalue_int64_out:
+ * @value: (out) (transfer none):
+ */
+void
+gi_marshalling_tests_gvalue_int64_out (GValue **value)
+{
+    static GValue *new_value = NULL;
+
+    if (new_value == NULL) {
+        new_value = g_new0(GValue, 1);
+        g_value_init(new_value, G_TYPE_INT64);
+        g_value_set_int64(new_value, G_MAXINT64);
+    }
+
+    *value = new_value;
+}
+
+/**
  * gi_marshalling_tests_gvalue_out_caller_allocates:
  * @value: (out) (transfer none):
  */
index 9b88223..cdcb08e 100644 (file)
@@ -528,11 +528,13 @@ void gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table);
 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_enum (GValue *value);
 
 void gi_marshalling_tests_gvalue_out (GValue **value);
+void gi_marshalling_tests_gvalue_int64_out (GValue **value);
 void gi_marshalling_tests_gvalue_out_caller_allocates (GValue *value);
 
 void gi_marshalling_tests_gvalue_inout (GValue **value);