summaryrefslogtreecommitdiff
path: root/tests/test_domain_cpp.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-15 17:03:26 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-15 17:15:40 +0900
commit21a3bd41275667b2120320cc792208aec161dce8 (patch)
tree1974853bd4a433ecdf8b59197f65c07023056f4a /tests/test_domain_cpp.py
parent5a42348fd78a874b682e0a46dcc8928610cb127e (diff)
downloadsphinx-git-21a3bd41275667b2120320cc792208aec161dce8.tar.gz
refactor: Fix flake8 violations under tests/ directory
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r--tests/test_domain_cpp.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py
index 2c8a43071..3f8d523ae 100644
--- a/tests/test_domain_cpp.py
+++ b/tests/test_domain_cpp.py
@@ -182,9 +182,9 @@ def test_expressions():
expr = i + l + u
exprCheck(expr, 'L' + expr + 'E')
decimalFloats = ['5e42', '5e+42', '5e-42',
- '5.', '5.e42', '5.e+42', '5.e-42',
- '.5', '.5e42', '.5e+42', '.5e-42',
- '5.0', '5.0e42', '5.0e+42', '5.0e-42']
+ '5.', '5.e42', '5.e+42', '5.e-42',
+ '.5', '.5e42', '.5e+42', '.5e-42',
+ '5.0', '5.0e42', '5.0e+42', '5.0e-42']
hexFloats = ['ApF', 'Ap+F', 'Ap-F',
'A.', 'A.pF', 'A.p+F', 'A.p-F',
'.A', '.ApF', '.Ap+F', '.Ap-F',
@@ -425,9 +425,9 @@ def test_member_definitions():
check('member', 'int b : 8 = 42', {1: 'b__i', 2: '1b'})
check('member', 'int b : 8{42}', {1: 'b__i', 2: '1b'})
# TODO: enable once the ternary operator is supported
- #check('member', 'int b : true ? 8 : a = 42', {1: 'b__i', 2: '1b'})
+ # check('member', 'int b : true ? 8 : a = 42', {1: 'b__i', 2: '1b'})
# TODO: enable once the ternary operator is supported
- #check('member', 'int b : (true ? 8 : a) = 42', {1: 'b__i', 2: '1b'})
+ # check('member', 'int b : (true ? 8 : a) = 42', {1: 'b__i', 2: '1b'})
check('member', 'int b : 1 || new int{0}', {1: 'b__i', 2: '1b'})
@@ -537,8 +537,8 @@ def test_function_definitions():
check('function', 'int foo(const A*...)', {1: "foo__ACPDp", 2: "3fooDpPK1A"})
check('function', 'int foo(const int A::*... a)', {2: "3fooDpM1AKi"})
check('function', 'int foo(const int A::*...)', {2: "3fooDpM1AKi"})
- #check('function', 'int foo(int (*a)(A)...)', {1: "foo__ACRDp", 2: "3fooDpPK1A"})
- #check('function', 'int foo(int (*)(A)...)', {1: "foo__ACRDp", 2: "3fooDpPK1A"})
+ # check('function', 'int foo(int (*a)(A)...)', {1: "foo__ACRDp", 2: "3fooDpPK1A"})
+ # check('function', 'int foo(int (*)(A)...)', {1: "foo__ACRDp", 2: "3fooDpPK1A"})
check('function', 'virtual void f()', {1: "f", 2: "1fv"})
# test for ::nestedName, from issue 1738
check("function", "result(int val, ::std::error_category const &cat)",
@@ -707,7 +707,6 @@ def test_class_definitions():
check('class', 'template<class T> {key}has_var<T, std::void_t<decltype(&T::var)>>',
{2: 'I0E7has_varI1TNSt6void_tIDTadN1T3varEEEEE'})
-
check('class', 'template<typename ...Ts> {key}T<int (*)(Ts)...>',
{2: 'IDpE1TIJPFi2TsEEE'})
check('class', 'template<int... Is> {key}T<(Is)...>',
@@ -1250,4 +1249,4 @@ def test_mix_decl_duplicate(app, warning):
assert "Declaration is '.. cpp:function:: void A()'." in ws[1]
assert "index.rst:3: WARNING: Duplicate C++ declaration, also defined at index:1." in ws[2]
assert "Declaration is '.. cpp:struct:: A'." in ws[3]
- assert ws[4] == "" \ No newline at end of file
+ assert ws[4] == ""