diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-12-24 01:54:35 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-12-24 01:54:35 +0900 |
commit | b5a9a056020e6bf5424a77a350b3204fd0e79a5a (patch) | |
tree | b17136105a8612ce3ddd0ff3dc850fbf2fc1b73f /tests/test_domain_c.py | |
parent | f2dc8a999a589bc7a9a85f6f0dd5691aabc17062 (diff) | |
parent | 6ad6594ec73d44d51c18faf0f41dd92f958cc45b (diff) | |
download | sphinx-git-b5a9a056020e6bf5424a77a350b3204fd0e79a5a.tar.gz |
Merge branch '4.x' into drop-translator-specific-unknown_visit-calls
Diffstat (limited to 'tests/test_domain_c.py')
-rw-r--r-- | tests/test_domain_c.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py index 0800c5059..d3198dcc0 100644 --- a/tests/test_domain_c.py +++ b/tests/test_domain_c.py @@ -8,6 +8,7 @@ :license: BSD, see LICENSE for details. """ +import itertools import zlib from xml.etree import ElementTree @@ -329,6 +330,13 @@ def test_domain_c_ast_fundamental_types(): input = "{key}%s foo" % t output = ' '.join(input.split()) check('type', input, {1: 'foo'}, key='typedef', output=output) + if ' ' in t: + # try permutations of all components + tcs = t.split() + for p in itertools.permutations(tcs): + input = "{key}%s foo" % ' '.join(p) + output = ' '.join(input.split()) + check("type", input, {1: 'foo'}, key='typedef', output=output) def test_domain_c_ast_type_definitions(): @@ -587,10 +595,7 @@ def test_domain_c_ast_attributes(): def test_extra_keywords(): with pytest.raises(DefinitionError, - match='Expected identifier, got user-defined keyword: complex.'): - parse('function', 'void f(int complex)') - with pytest.raises(DefinitionError, - match='Expected identifier, got user-defined keyword: complex.'): + match='Expected identifier in nested name'): parse('function', 'void complex(void)') |