From a52dd2c3cf240c8b6b621305b2f80d76eadc7a64 Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Fri, 26 Jul 2013 13:47:36 +0200 Subject: tests: move GTK-Doc comment block warning tests It makes sense to let test_parser.py check everything which is focused purely on testing GTK-Doc comment blocks (ie annotationparser.py functionality). --- tests/scanner/annotationparser/gi/identifier.xml | 94 ++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tests/scanner/annotationparser/gi/identifier.xml (limited to 'tests/scanner/annotationparser/gi/identifier.xml') diff --git a/tests/scanner/annotationparser/gi/identifier.xml b/tests/scanner/annotationparser/gi/identifier.xml new file mode 100644 index 00000000..3682ab24 --- /dev/null +++ b/tests/scanner/annotationparser/gi/identifier.xml @@ -0,0 +1,94 @@ + + + + + + + /** + * This is not a valid section identifier + * SECTION:test_invalid_section_identifier + * + * Above identifier is not on the first line. + **/ + + + 2: Warning: Test: ignoring unrecognized GTK-Doc comment block, identifier not found: + * This is not a valid section identifier + ^ + + + + + + + /** + +* SECTION:meepapp +*/ + + + 2: Warning: Test: ignoring unrecognized GTK-Doc comment block, identifier not found: + +^ + + + + + + + /** + * SECTION:meepapp + * SECTION:meepapp2 + * @short_description: the application class + * + * The application class handles ... + */ + + + + SECTION:meepapp + + + + short_description + the application class + + + SECTION:meepapp2 +The application class handles ... + + + + + + + /** + * gnm_cell_set_expr_and_value: Stores (WITHOUT COPYING) the supplied value, and + * references the supplied expression and links it into the expression + * list. It marks the sheet as dirty. It is intended for use by import + * routines or operations that do bulk assignment. + * + * WARNING : This is an internal routine that does not queue redraws, + * does not auto-resize, does not calculate spans, and does + * not render the value. + * + * NOTE : This DOES check for array partitioning. + */ + + + 2: Warning: Test: ignoring unrecognized GTK-Doc comment block, identifier not found: + * gnm_cell_set_expr_and_value: Stores (WITHOUT COPYING) the supplied value, and + ^ + + + + + -- cgit v1.2.1 From 2f11cda9ec19262833486ab796d5708d01353c3b Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Thu, 30 May 2013 13:24:51 +0200 Subject: giscanner: fix GTK-Doc identifier parsing No need to track what type of identifier we've found as we don't use that information later on. Continue searching for an identifier if it's not found on the first line like gtkdoc-mkdb does. --- tests/scanner/annotationparser/gi/identifier.xml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'tests/scanner/annotationparser/gi/identifier.xml') diff --git a/tests/scanner/annotationparser/gi/identifier.xml b/tests/scanner/annotationparser/gi/identifier.xml index 3682ab24..b8de9c84 100644 --- a/tests/scanner/annotationparser/gi/identifier.xml +++ b/tests/scanner/annotationparser/gi/identifier.xml @@ -13,8 +13,14 @@ * Above identifier is not on the first line. **/ + + + SECTION:test_invalid_section_identifier + + Above identifier is not on the first line. + - 2: Warning: Test: ignoring unrecognized GTK-Doc comment block, identifier not found: + 2: Warning: Test: identifier not found on the first line: * This is not a valid section identifier ^ @@ -27,11 +33,18 @@ --> /** + + * SECTION:meepapp */ + + + SECTION:meepapp + + - 2: Warning: Test: ignoring unrecognized GTK-Doc comment block, identifier not found: + 2: Warning: Test: identifier not found on the first line: ^ @@ -84,7 +97,7 @@ The application class handles ... */ - 2: Warning: Test: ignoring unrecognized GTK-Doc comment block, identifier not found: + 2: Warning: Test: identifier not found on the first line: * gnm_cell_set_expr_and_value: Stores (WITHOUT COPYING) the supplied value, and ^ -- cgit v1.2.1 From 0af20939c8e2deaf1d1f06e069594d53acf65d2f Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Tue, 13 Aug 2013 23:16:41 +0200 Subject: giscanner: make some warnings errors GTK-Doc comment block fixer tool will refuse to rewrite source files that generated errors (indicating a source->parse tree->source would result in information being lost), but will happily continue on warnings (which do not result in information being lost). --- tests/scanner/annotationparser/gi/identifier.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/scanner/annotationparser/gi/identifier.xml') diff --git a/tests/scanner/annotationparser/gi/identifier.xml b/tests/scanner/annotationparser/gi/identifier.xml index b8de9c84..dd8ee17e 100644 --- a/tests/scanner/annotationparser/gi/identifier.xml +++ b/tests/scanner/annotationparser/gi/identifier.xml @@ -20,7 +20,7 @@ Above identifier is not on the first line. - 2: Warning: Test: identifier not found on the first line: + 2: Error: Test: identifier not found on the first line: * This is not a valid section identifier ^ @@ -44,7 +44,7 @@ - 2: Warning: Test: identifier not found on the first line: + 2: Error: Test: identifier not found on the first line: ^ @@ -97,7 +97,7 @@ The application class handles ... */ - 2: Warning: Test: identifier not found on the first line: + 2: Error: Test: identifier not found on the first line: * gnm_cell_set_expr_and_value: Stores (WITHOUT COPYING) the supplied value, and ^ -- cgit v1.2.1 From 6a874b86a1b9aae0c50a30b8cd3033870797eb1c Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Tue, 23 Jul 2013 17:34:07 +0200 Subject: giscanner: refactor GTK-Doc comment block serialization --- tests/scanner/annotationparser/gi/identifier.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/scanner/annotationparser/gi/identifier.xml') diff --git a/tests/scanner/annotationparser/gi/identifier.xml b/tests/scanner/annotationparser/gi/identifier.xml index dd8ee17e..eb090307 100644 --- a/tests/scanner/annotationparser/gi/identifier.xml +++ b/tests/scanner/annotationparser/gi/identifier.xml @@ -25,6 +25,11 @@ ^ + /** + * SECTION:test_invalid_section_identifier + * + * Above identifier is not on the first line. + */ @@ -49,6 +54,9 @@ ^ + /** + * SECTION:meepapp + */ @@ -77,6 +85,13 @@ The application class handles ... + /** + * SECTION:meepapp + * @short_description: the application class + * + * SECTION:meepapp2 + * The application class handles ... + */ -- cgit v1.2.1