From 97b30ae5e77d5e36d127d02b247d6d41b8e1c8c3 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 2 Dec 2012 12:15:53 -0500 Subject: 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 --- tests/scanner/regress.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/scanner/regress.c') 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 */ /** -- cgit v1.2.1