summaryrefslogtreecommitdiff
path: root/tests/test_domain_cpp.py
diff options
context:
space:
mode:
authorJakob Lykke Andersen <Jakob@caput.dk>2016-06-26 10:00:54 +0200
committerJakob Lykke Andersen <Jakob@caput.dk>2016-06-26 10:02:15 +0200
commitf64ec1349a3a4a7644f02264cd10a3c5ad32b468 (patch)
tree47704ad67f6a11b955e669486bf1960f7b5c266b /tests/test_domain_cpp.py
parent4be597bb349e3bd61feaf23ee13d703e43316f52 (diff)
downloadsphinx-git-f64ec1349a3a4a7644f02264cd10a3c5ad32b468.tar.gz
C++, initial support for attributes.
Only simple GNU style supported, and only in the decl-specifier-list. See sphinx-doc/sphinx#2682.
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r--tests/test_domain_cpp.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py
index 778ac1c55..5d24de058 100644
--- a/tests/test_domain_cpp.py
+++ b/tests/test_domain_cpp.py
@@ -402,6 +402,19 @@ def test_templates():
"RK18c_string_view_baseIK4Char6TraitsE")
+def test_attributes():
+ # style: GNU
+ check('member', '__attribute__(()) int f', 'f__i', '1f')
+ check('member', '__attribute__((a)) int f', 'f__i', '1f')
+ check('member', '__attribute__((a, b)) int f', 'f__i', '1f')
+
+ # position: decl specs
+ check('function', 'static inline __attribute__(()) void f()',
+ 'f', '1fv',
+ output='__attribute__(()) static inline void f()')
+
+
+
# def test_print():
# # used for getting all the ids out for checking
# for a in ids: