[gobject-introspection] regress: Add a test case for skipping a function with an unannotated callback
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] regress: Add a test case for skipping a function with an unannotated callback
- Date: Sat, 27 Oct 2012 17:55:47 +0000 (UTC)
commit 6fc366a66c58039aec345cc531c329729b6bce18
Author: Colin Walters <walters verbum org>
Date: Sat Oct 27 13:54:44 2012 -0400
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(+), 0 deletions(-)
---
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.</d
</parameter>
</parameters>
</function>
+ <function name="test_skip_unannotated_callback"
+ c:identifier="regress_test_skip_unannotated_callback"
+ introspectable="0">
+ <doc xml:whitespace="preserve">Should not emit a warning:
+https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <parameter name="callback" transfer-ownership="none">
+ <doc xml:whitespace="preserve">No annotation here</doc>
+ <type name="TestCallback" c:type="RegressTestCallback"/>
+ </parameter>
+ </parameters>
+ </function>
<function name="test_ssize" c:identifier="regress_test_ssize">
<return-value transfer-ownership="none">
<type name="gssize" c:type="gssize"/>
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]