summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-08-14 05:42:53 -0400
committerColin Walters <walters@verbum.org>2011-08-14 06:01:52 -0400
commitff290d2982c6f7a3ee31a8275e9d78bf49ad9dbe (patch)
tree0c282f61947f1169a1d2f718bb949a9d8fd7d57e /tests
parent736924a8ed80b6d8ef14f342abf3440a8e9c9541 (diff)
downloadgobject-introspection-ff290d2982c6f7a3ee31a8275e9d78bf49ad9dbe.tar.gz
annotationparser: Don't eat lines that look like parameters outside param list
If we're done parsing parameters, previously we would simply eat lines that looked like @foo: blah blah Example is in gtkcssprovider.c. https://bugzilla.gnome.org/show_bug.cgi?id=656504
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/regress.c38
-rw-r--r--tests/scanner/regress.h1
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 938bcf11..276a7d10 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -3210,6 +3210,44 @@ regress_test_multiline_doc_comments (void)
}
/**
+ * regress_test_nested_parameter:
+ * @a: An integer
+ *
+ * <informaltable>
+ * <tgroup cols="3">
+ * <thead>
+ * <row>
+ * <entry>Syntax</entry>
+ * <entry>Explanation</entry>
+ * <entry>Examples</entry>
+ * </row>
+ * </thead>
+ * <tbody>
+ * <row>
+ * <entry>rgb(@r, @g, @b)</entry>
+ * <entry>An opaque color; @r, @g, @b can be either integers between
+ * 0 and 255 or percentages</entry>
+ * <entry><literallayout>rgb(128, 10, 54)
+ * rgb(20%, 30%, 0%)</literallayout></entry>
+ * </row>
+ * <row>
+ * <entry>rgba(@r, @g, @b, @a)</entry>
+ * <entry>A translucent color; @r, @g, @b are as in the previous row,
+ * @a is a floating point number between 0 and 1</entry>
+ * <entry><literallayout>rgba(255, 255, 0, 0.5)</literallayout></entry>
+ * </row>
+ * </tbody>
+ * </tgroup>
+ * </informaltable>
+ *
+ * What we're testing here is that the scanner ignores the @a nested inside XML.
+ */
+void
+regress_test_nested_parameter (int a)
+{
+}
+
+/**
* regress_introspectable_via_alias:
*
*/
diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h
index 4c74e098..25d43586 100644
--- a/tests/scanner/regress.h
+++ b/tests/scanner/regress.h
@@ -611,6 +611,7 @@ GValue *regress_test_strv_in_gvalue (void);
GObject * _regress_this_is_a_private_symbol (void);
void regress_test_multiline_doc_comments (void);
+void regress_test_nested_parameter (int a);
/**
* RegressSkippedStructure: (skip)