summaryrefslogtreecommitdiff
path: root/tests/scanner/regress.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-12-02 12:15:53 -0500
committerColin Walters <walters@verbum.org>2012-12-02 16:25:02 -0500
commit97b30ae5e77d5e36d127d02b247d6d41b8e1c8c3 (patch)
tree5e038984d7b6586a747b06dd2476079b68587f80 /tests/scanner/regress.c
parentceb84d1e084b8048b2abb81d1e1ebe600f00d00e (diff)
downloadgobject-introspection-97b30ae5e77d5e36d127d02b247d6d41b8e1c8c3.tar.gz
WarnLib: New library for testing API that emits warnings
Both GIMarshallingTests and Regress right now use --warn-error; but in some cases (e.g. GErrors without a corresponding enum), we still want bindings to support the functionality. So add this new library where we can add C API that emits introspection warnings. https://bugzilla.gnome.org/show_bug.cgi?id=689488
Diffstat (limited to 'tests/scanner/regress.c')
-rw-r--r--tests/scanner/regress.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index b7526bfb..27791d7e 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -1656,6 +1656,20 @@ regress_atest_error_quark (void)
return g_quark_from_static_string ("regress-atest-error");
}
+GQuark
+regress_unpaired_error_quark (void)
+{
+ return g_quark_from_static_string ("regress-unpaired-error");
+}
+
+gboolean
+regress_throw_unpaired (GError **error)
+{
+ g_set_error_literal (error, regress_unpaired_error_quark (), 0,
+ "Unpaired error");
+ return FALSE;
+}
+
/* structures */
/**