summaryrefslogtreecommitdiff
path: root/tests/test_domain_cpp.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-12-24 01:54:35 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-12-24 01:54:35 +0900
commitb5a9a056020e6bf5424a77a350b3204fd0e79a5a (patch)
treeb17136105a8612ce3ddd0ff3dc850fbf2fc1b73f /tests/test_domain_cpp.py
parentf2dc8a999a589bc7a9a85f6f0dd5691aabc17062 (diff)
parent6ad6594ec73d44d51c18faf0f41dd92f958cc45b (diff)
downloadsphinx-git-b5a9a056020e6bf5424a77a350b3204fd0e79a5a.tar.gz
Merge branch '4.x' into drop-translator-specific-unknown_visit-calls
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r--tests/test_domain_cpp.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py
index ede4a2531..5ff8f8e12 100644
--- a/tests/test_domain_cpp.py
+++ b/tests/test_domain_cpp.py
@@ -8,6 +8,7 @@
:license: BSD, see LICENSE for details.
"""
+import itertools
import re
import zlib
@@ -137,9 +138,17 @@ def test_domain_cpp_ast_fundamental_types():
if t == "std::nullptr_t":
id = "NSt9nullptr_tE"
return "1f%s" % id
+ id1 = makeIdV1()
+ id2 = makeIdV2()
input = "void f(%s arg)" % t.replace(' ', ' ')
output = "void f(%s arg)" % t
- check("function", input, {1: makeIdV1(), 2: makeIdV2()}, output=output)
+ check("function", input, {1: id1, 2: id2}, output=output)
+ if ' ' in t:
+ # try permutations of all components
+ tcs = t.split()
+ for p in itertools.permutations(tcs):
+ input = "void f(%s arg)" % ' '.join(p)
+ check("function", input, {1: id1, 2: id2})
def test_domain_cpp_ast_expressions():