mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[C++] Support attributes on class and union and improve formatting
This commit is contained in:
@@ -996,6 +996,15 @@ def test_domain_cpp_ast_attributes():
|
||||
# position: parameters and qualifiers
|
||||
check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f', 2: '1fv'})
|
||||
|
||||
# position: class
|
||||
check('class', '{key}[[nodiscard]] Foo', {1: 'Foo', 2: '3Foo', 3: '3Foo', 4: '3Foo'},
|
||||
key='class')
|
||||
check('union', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo', 3: '3Foo', 4: '3Foo'},
|
||||
key='union')
|
||||
# position: enum
|
||||
check('enum', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo', 3: '3Foo', 4: '3Foo'},
|
||||
key='enum')
|
||||
|
||||
|
||||
def test_domain_cpp_ast_xref_parsing():
|
||||
def check(target):
|
||||
|
||||
Reference in New Issue
Block a user