[gtk-doc] tests/scan: add another test for internal inline functions



commit 37d11d9dbc5c0c38124c8fcdd76bae08521f99ce
Author: Stefan Sauer <ensonic users sf net>
Date:   Thu Jul 11 22:57:27 2019 -0700

    tests/scan: add another test for internal inline functions
    
    Add more variants to debugs #90.

 tests/scan.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/tests/scan.py b/tests/scan.py
index e55ed5a..55d675a 100755
--- a/tests/scan.py
+++ b/tests/scan.py
@@ -242,7 +242,7 @@ class ScanHeaderContentFunctions(ScanHeaderContentTestCase):
         self.assertNoDeclFound(slist)
 
     @parameterized.expand(INLINE_MODIFIERS)
-    def test_IgnoresInternalInlineFunction(self, _, modifier):
+    def test_IgnoresInternalInlineVoidFunction(self, _, modifier):
         header = textwrap.dedent("""\
             %s void _internal(void) {
             }""" % modifier)
@@ -250,6 +250,15 @@ class ScanHeaderContentFunctions(ScanHeaderContentTestCase):
             header.splitlines(keepends=True))
         self.assertNoDeclFound(slist)
 
+    @parameterized.expand(INLINE_MODIFIERS)
+    def test_IgnoresInternalInlineFunction(self, _, modifier):
+        header = textwrap.dedent("""\
+            %s int _internal(int a) {
+              return a + a; }""" % modifier)
+        slist, doc_comments = self.scanHeaderContent(
+            header.splitlines(keepends=True))
+        self.assertNoDeclFound(slist)
+
     @parameterized.expand([(t.replace(' ', '_'), t) for t in BASIC_TYPES_WITH_VOID])
     def test_HandlesReturnValue(self, _, ret_type):
         header = '%s func(void);' % ret_type
@@ -767,6 +776,6 @@ if __name__ == '__main__':
     # from gtkdoc import common
     # common.setup_logging()
     #
-    # t = ScanHeaderContentUserFunction()
+    # t = ScanHeaderContentFunctions()
     # t.setUp()
-    # t.test_FindsFunctionStruct_Void_WithLinebreakAfterRetType()
+    # t.test_IgnoresInternalInlineFunction()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]