diff options
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)') |