From: Colin Walters Date: Sat, 27 Oct 2012 17:54:44 +0000 (-0400) Subject: regress: Add a test case for skipping a function with an unannotated callback X-Git-Tag: GOBJECT_INTROSPECTION_1_35_2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fc366a66c58039aec345cc531c329729b6bce18;p=platform%2Fupstream%2Fgobject-introspection.git regress: Add a test case for skipping a function with an unannotated callback https://bugzilla.gnome.org/show_bug.cgi?id=685399 --- diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 8d123f7..125a1ea 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 c6ca6b7..bdc1dc3 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 b55c463..b1a8286 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 */