[gobject-introspection] Add GIMarshallingTests function which sets a GError, to test exception handling in bindings.
- From: Laszlo Pandy <lpandy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Add GIMarshallingTests function which sets a GError, to test exception handling in bindings.
- Date: Wed, 19 Jan 2011 17:18:31 +0000 (UTC)
commit 8ae994ef54a040bcf2e3b9f71d4a5c1d5ede98d5
Author: Laszlo Pandy <lpandy src gnome org>
Date: Wed Jan 19 17:31:16 2011 +0100
Add GIMarshallingTests function which sets a GError, to test exception handling in bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=639834
tests/gimarshallingtests.c | 11 +++++++++++
tests/gimarshallingtests.h | 8 ++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 0960bff..54f8835 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -3220,6 +3220,17 @@ gi_marshalling_tests_int_return_out (gint *int_)
return 6;
}
+/* GError */
+
+void
+gi_marshalling_tests_gerror(GError **error)
+{
+ GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
+ g_set_error_literal(error,
+ quark,
+ GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
+ GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
+}
static GIMarshallingTestsOverridesStruct *
gi_marshalling_tests_overrides_struct_copy (GIMarshallingTestsOverridesStruct *struct_)
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index 0605883..cc992ca 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -683,6 +683,14 @@ gint gi_marshalling_tests_int_return_out (gint *int_);
void gi_marshalling_tests_utf8_full_out_out (gchar **utf80, gchar **utf82);
+/* GError */
+
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN "gi-marshalling-tests-gerror-domain"
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE 5
+#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE "gi-marshalling-tests-gerror-message"
+
+void gi_marshalling_tests_gerror(GError **error);
+
/* Overrides */
#define GI_MARSHALLING_TESTS_OVERRIDES_CONSTANT 42
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]