diff --git a/tests/roots/test-domain-cpp/field-role.rst b/tests/roots/test-domain-cpp/field-role.rst new file mode 100644 index 000000000..1711a889c --- /dev/null +++ b/tests/roots/test-domain-cpp/field-role.rst @@ -0,0 +1,5 @@ +.. cpp:function:: void f() + + :throws int: + :throws int*: + diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 52aaad850..8b157cc70 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -1237,6 +1237,13 @@ not found in `{test}` assert any_role.classes == texpr_role.content_classes['a'], expect +@pytest.mark.sphinx(testroot='domain-cpp', confoverrides={'nitpicky': True}) +def test_build_domain_cpp_field_role(app, status, warning): + app.builder.build_all() + ws = filter_warnings(warning, "field-role") + assert len(ws) == 0 + + def test_noindexentry(app): text = (".. cpp:function:: void f()\n" ".. cpp:function:: void g()\n"