summaryrefslogtreecommitdiff
path: root/tests/test_domain_cpp.py
diff options
context:
space:
mode:
authorJakob Lykke Andersen <Jakob@caput.dk>2017-12-28 16:50:32 +0100
committerJakob Lykke Andersen <Jakob@caput.dk>2017-12-28 16:50:32 +0100
commitf3c05adebc6f42eed3ccdc498f5deb45bf4f9885 (patch)
treed54aaaed3bd644424ec011a09920a48369121a9f /tests/test_domain_cpp.py
parent324bc7e3c430ff143296cc4e2df187a92dd06127 (diff)
downloadsphinx-git-f3c05adebc6f42eed3ccdc498f5deb45bf4f9885.tar.gz
C++, fix handling of (templated) operators
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r--tests/test_domain_cpp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py
index aa398370d..0b31d8aed 100644
--- a/tests/test_domain_cpp.py
+++ b/tests/test_domain_cpp.py
@@ -205,6 +205,9 @@ def test_expressions():
check('class', "template<int T = 42> A", {2: "I_iE1A"})
check('enumerator', 'A = std::numeric_limits<unsigned long>::max()', {2: "1A"})
+ exprCheck('operator()()', 'clclE')
+ exprCheck('operator()<int>()', 'clclIiEE')
+
def test_type_definitions():
check("type", "public bool b", {1: "b", 2: "1b"}, "bool b")
@@ -245,6 +248,10 @@ def test_type_definitions():
check('type', 'T = A::template B<int>::template C<double>', {2: '1T'})
+ check('type', 'T = Q<A::operator()>', {2: '1T'})
+ check('type', 'T = Q<A::operator()<int>>', {2: '1T'})
+ check('type', 'T = Q<A::operator bool>', {2: '1T'})
+
def test_concept_definitions():
check('concept', 'template<typename Param> A::B::Concept',