From 6fc366a66c58039aec345cc531c329729b6bce18 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 27 Oct 2012 13:54:44 -0400 Subject: regress: Add a test case for skipping a function with an unannotated callback https://bugzilla.gnome.org/show_bug.cgi?id=685399 --- tests/scanner/Regress-1.0-expected.gir | 15 +++++++++++++++ tests/scanner/regress.c | 12 ++++++++++++ tests/scanner/regress.h | 2 ++ 3 files changed, 29 insertions(+) (limited to 'tests') diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 8d123f7a..125a1ea3 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -3125,6 +3125,21 @@ What we're testing here is that the scanner ignores the @a nested inside XML. + + Should not emit a warning: +https://bugzilla.gnome.org/show_bug.cgi?id=685399 + + + + + + No annotation here + + + + diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c index c6ca6b74..bdc1dc3c 100644 --- a/tests/scanner/regress.c +++ b/tests/scanner/regress.c @@ -3514,6 +3514,18 @@ regress_test_owned_gerror_callback (RegressTestCallbackOwnedGError callback) callback (error); } +/** + * regress_test_skip_unannotated_callback: (skip) + * @callback: No annotation here + * + * Should not emit a warning: + * https://bugzilla.gnome.org/show_bug.cgi?id=685399 + */ +void +regress_test_skip_unannotated_callback (RegressTestCallback callback) +{ +} + /* interface */ static void diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index b55c463b..b1a82868 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -696,6 +696,8 @@ void regress_test_gerror_callback (RegressTestCallbackGError callback); void regress_test_null_gerror_callback (RegressTestCallbackGError callback); void regress_test_owned_gerror_callback (RegressTestCallbackOwnedGError callback); +void regress_test_skip_unannotated_callback (RegressTestCallback callback); + typedef struct _RegressTestInterface RegressTestInterface; /* interface */ -- cgit v1.2.1