diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2019-07-11 22:57:27 -0700 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2019-07-11 22:57:27 -0700 |
commit | 37d11d9dbc5c0c38124c8fcdd76bae08521f99ce (patch) | |
tree | 8296ca80430ed341e169c76dfa06d52a0ac8355f | |
parent | 5e3f2cee6a99f720d7acdc7e8803f0cc75c125f7 (diff) | |
download | gtk-doc-37d11d9dbc5c0c38124c8fcdd76bae08521f99ce.tar.gz |
tests/scan: add another test for internal inline functions
Add more variants to debugs #90.
-rwxr-xr-x | tests/scan.py | 15 |
1 files 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() |