diff options
author | Jan Babst <jan.babst@live.de> | 2020-04-15 00:10:13 +0200 |
---|---|---|
committer | Jan Babst <jan.babst@live.de> | 2020-04-24 23:59:41 +0200 |
commit | 95e92044380cf5033e28460fc318961e98e3c2d4 (patch) | |
tree | 0776ce83a10d6c59f17f78a72235f0e80e9af500 /tests/test_domain_cpp.py | |
parent | 2fac698e764ac28dec86844624f4ac415ea11a37 (diff) | |
download | sphinx-git-95e92044380cf5033e28460fc318961e98e3c2d4.tar.gz |
C++, add support for parameterized noexcept specifier in function declarations
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r-- | tests/test_domain_cpp.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 0b757139a..0180a11d3 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -393,7 +393,7 @@ def test_function_definitions(): x = 'std::vector<std::pair<std::string, int>> &module::test(register int ' \ 'foo, bar, std::string baz = "foobar, blah, bleh") const = 0' check('function', x, {1: "module::test__i.bar.ssC", - 2: "NK6module4testEi3barNSt6stringE"}) + 2: "NK6module4testEi3barNSt6stringE"}) check('function', 'void f(std::pair<A, B>)', {1: "f__std::pair:A.B:", 2: "1fNSt4pairI1A1BEE"}) check('function', 'explicit module::myclass::foo::foo()', @@ -427,6 +427,10 @@ def test_function_definitions(): {1: "get_valueCE", 2: "9get_valuev"}) check('function', 'int get_value() const noexcept', {1: "get_valueC", 2: "NK9get_valueEv"}) + check('function', 'int get_value() const noexcept(std::is_nothrow_move_constructible<T>::value)', + {1: "get_valueC", 2: "NK9get_valueEv"}) + check('function', 'int get_value() const noexcept("see below")', + {1: "get_valueC", 2: "NK9get_valueEv"}) check('function', 'int get_value() const noexcept = delete', {1: "get_valueC", 2: "NK9get_valueEv"}) check('function', 'int get_value() volatile const', @@ -868,7 +872,7 @@ def test_xref_parsing(): def filter_warnings(warning, file): - lines = warning.getvalue().split("\n"); + lines = warning.getvalue().split("\n") res = [l for l in lines if "domain-cpp" in l and "{}.rst".format(file) in l and "WARNING: document isn't included in any toctree" not in l] print("Filtered warnings for file '{}':".format(file)) |