[gtk-doc] scan: move test from the regression suite to the unit tests
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] scan: move test from the regression suite to the unit tests
- Date: Tue, 27 Nov 2018 18:01:35 +0000 (UTC)
commit d14196cd4d940491548bdfc6e7c9bd19634e4250
Author: Stefan Sauer <ensonic users sf net>
Date: Tue Nov 27 12:30:10 2018 +0100
scan: move test from the regression suite to the unit tests
tests/bugs/docs/tester-sections.txt | 1 -
tests/bugs/src/tester.h | 7 -------
tests/scan.py | 16 ++++++++++++++++
3 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index 2669275..1db0da9 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -81,7 +81,6 @@ G_GNUC_DEPRECATED_FOR
GLIB_DEPRECATED
BUG_711598_DEPRECATED_FOR
bug_554833_new
-BUG_731417_DEPRECATED
Bug730658
G_GNUC_NONNULL
</SECTION>
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index 1d06c71..0042574 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -503,13 +503,6 @@ void bug_749142 (void);
void bug_783420 (int in, int *out);
-/**
- * BUG_731417_DEPRECATED:
- *
- * https://bugzilla.gnome.org/show_bug.cgi?id=731417
- */
-#define BUG_731417_DEPRECATED 1
-
/**
* Bug730658:
* @BUG_730658_CAN_READ: Can read
diff --git a/tests/scan.py b/tests/scan.py
index 16d7018..f280da5 100644
--- a/tests/scan.py
+++ b/tests/scan.py
@@ -153,6 +153,22 @@ class ScanHeaderContentMacros(ScanHeaderContentTestCase):
])
self.assertNoDeclFound(slist)
+ def test_FindsDocCommentForDeprecationGuard(self):
+ header = textwrap.dedent("""\
+ /**
+ * GTKDOC_TESTER_DISABLE_DEPRECATED:
+ *
+ * Documentation for a deprecation guard.
+ */
+ #define GTKDOC_TESTER_DISABLE_DEPRECATED 1""")
+ slist, doc_comments = self.scanHeaderContent(
+ header.splitlines(keepends=True))
+ self.assertEqual(1, len(doc_comments))
+ self.assertIn('gtkdoc_tester_disable_deprecated', doc_comments)
+ self.assertEqual(['GTKDOC_TESTER_DISABLE_DEPRECATED'], slist)
+ self.assertDecl('GTKDOC_TESTER_DISABLE_DEPRECATED',
+ '#define GTKDOC_TESTER_DISABLE_DEPRECATED 1')
+
class ScanHeaderContentStructs(ScanHeaderContentTestCase):
"""Test parsing of struct declarations."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]