diff options
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r-- | tests/test_domain_cpp.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 46019b4a9..d6470dc7c 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -755,6 +755,20 @@ def test_attributes(): check('member', 'int *[[attr]] *i', {1: 'i__iPP', 2: '1i'}) +def test_xref_parsing(): + def check(target): + class Config: + cpp_id_attributes = ["id_attr"] + cpp_paren_attributes = ["paren_attr"] + parser = DefinitionParser(target, None, Config()) + ast, isShorthand = parser.parse_xref_object() + parser.assert_end() + check('f') + check('f()') + check('void f()') + check('T f()') + + # def test_print(): # # used for getting all the ids out for checking # for a in ids: |