diff options
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r-- | tests/test_domain_cpp.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 8fc974f49..72ffc474d 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -1,12 +1,4 @@ -""" - test_domain_cpp - ~~~~~~~~~~~~~~~ - - Tests the C++ Domain - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the C++ Domain""" import itertools import re @@ -996,6 +988,11 @@ def test_domain_cpp_ast_attributes(): # position: parameters and qualifiers check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f', 2: '1fv'}) + # position: class, union, enum + check('class', '{key}[[nodiscard]] Foo', {1: 'Foo', 2: '3Foo'}, key='class') + check('union', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='union') + check('enum', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='enum') + def test_domain_cpp_ast_xref_parsing(): def check(target): |