diff options
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r-- | tests/test_domain_cpp.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 690093f5c..edd5ea5bc 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -21,7 +21,6 @@ from sphinx.domains.cpp import (DefinitionError, DefinitionParser, NoOldIdError, from sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping from sphinx.testing import restructuredtext from sphinx.testing.util import assert_node -from sphinx.util import docutils def parse(name, string): @@ -290,13 +289,16 @@ def test_expressions(): exprCheck('5 == 42', 'eqL5EL42E') exprCheck('5 != 42', 'neL5EL42E') exprCheck('5 not_eq 42', 'neL5EL42E') - # ['<=', '>=', '<', '>'] + # ['<=', '>=', '<', '>', '<=>'] exprCheck('5 <= 42', 'leL5EL42E') exprCheck('A <= 42', 'le1AL42E') exprCheck('5 >= 42', 'geL5EL42E') exprCheck('5 < 42', 'ltL5EL42E') exprCheck('A < 42', 'lt1AL42E') exprCheck('5 > 42', 'gtL5EL42E') + exprCheck('A > 42', 'gt1AL42E') + exprCheck('5 <=> 42', 'ssL5EL42E') + exprCheck('A <=> 42', 'ss1AL42E') # ['<<', '>>'] exprCheck('5 << 42', 'lsL5EL42E') exprCheck('A << 42', 'ls1AL42E') @@ -617,6 +619,9 @@ def test_function_definitions(): # from breathe#441 check('function', 'auto MakeThingy() -> Thingy*', {1: 'MakeThingy', 2: '10MakeThingyv'}) + # from #8960 + check('function', 'void f(void (*p)(int, double), int i)', {2: '1fPFvidEi'}) + def test_operators(): check('function', 'void operator new()', {1: "new-operator", 2: "nwv"}) @@ -662,6 +667,7 @@ def test_operators(): check('function', 'void operator>()', {1: "gt-operator", 2: "gtv"}) check('function', 'void operator<=()', {1: "lte-operator", 2: "lev"}) check('function', 'void operator>=()', {1: "gte-operator", 2: "gev"}) + check('function', 'void operator<=>()', {1: None, 2: "ssv"}) check('function', 'void operator!()', {1: "not-operator", 2: "ntv"}) check('function', 'void operator not()', {2: "ntv"}) check('function', 'void operator&&()', {1: "sand-operator", 2: "aav"}) @@ -1081,8 +1087,6 @@ def test_build_domain_cpp_misuse_of_roles(app, status, warning): assert len(ws) == len(warn) -@pytest.mark.skipif(docutils.__version_info__ < (0, 13), - reason='docutils-0.13 or above is required') @pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': True}) def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, warning): app.builder.build_all() @@ -1124,8 +1128,6 @@ def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, war check(s, t, f) -@pytest.mark.skipif(docutils.__version_info__ < (0, 13), - reason='docutils-0.13 or above is required') @pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'add_function_parentheses': False}) def test_build_domain_cpp_with_add_function_parentheses_is_False(app, status, warning): app.builder.build_all() |