From abe694b6304c1d62fdb9ad1caa85ec91efac31d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 29 Dec 2018 21:13:08 +0100 Subject: testing: improve tests for \ref. Tests for C++11 user-defined literals from https://github.com/doxygen/doxygen/issues/6299 were missing, adding them to avoid the regression re-appearing in the future. --- testing/074/namespacens.xml | 81 +++++++++++++++++++++++++++++++++++++++++++++ testing/074/struct_foo.xml | 22 ++++++------ testing/074_ref.cpp | 25 ++++++++++++++ 3 files changed, 117 insertions(+), 11 deletions(-) create mode 100644 testing/074/namespacens.xml diff --git a/testing/074/namespacens.xml b/testing/074/namespacens.xml new file mode 100644 index 0000000..495e550 --- /dev/null +++ b/testing/074/namespacens.xml @@ -0,0 +1,81 @@ + + + + ns + + + int + int ns::operator""_op + (unsigned long long) + operator""_op + + unsigned long long + + + An operator. + + + + + + + + + int + int ns::operator""_oq + (unsigned long long) + operator""_oq + + unsigned long long + + + Another operator. + + + + + + + + + void + void ns::foo + (std::initializer_list< int * >) + foo + + std::initializer_list< int * > + + + Function. + + + + + + + + + +A namespace. + + + + + + Link to an UDL w/o spaces: operator""_op + + + Link to an UDL with spaces: operator""_oq + + + Link to a function with spaces: foo(std::initializer_list< int* >) + + + Link to a function w/o spaces: foo(std::initializer_list<int*>) + + + + + + + diff --git a/testing/074/struct_foo.xml b/testing/074/struct_foo.xml index 56a497a..c49fbaa 100644 --- a/testing/074/struct_foo.xml +++ b/testing/074/struct_foo.xml @@ -15,7 +15,7 @@ - + Foo & @@ -33,7 +33,7 @@ - + const Foo & @@ -51,7 +51,7 @@ - + int @@ -69,7 +69,7 @@ - + int @@ -87,7 +87,7 @@ - + Foo & @@ -105,7 +105,7 @@ - + Foo & @@ -123,7 +123,7 @@ - + int * @@ -141,7 +141,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -240,7 +240,7 @@ - + Foo diff --git a/testing/074_ref.cpp b/testing/074_ref.cpp index 141e2b4..d283907 100644 --- a/testing/074_ref.cpp +++ b/testing/074_ref.cpp @@ -1,5 +1,9 @@ // objective: test \ref command in combination with const // check: struct_foo.xml +// check: namespacens.xml + +#include + /** @brief Foo class. * * @see @ref Foo::Foo() constructor for details. @@ -47,3 +51,24 @@ struct Foo { /** @brief Fun with itself */ Foo fun() const; }; + +/** +@brief A namespace + +- Link to an UDL w/o spaces: @link operator""_op @endlink +- Link to an UDL with spaces: @link operator""_oq @endlink +- Link to a function with spaces: @ref foo(std::initializer_list< int* >) +- Link to a function w/o spaces: @ref foo(std::initializer_list) +*/ +namespace ns { + +/** @brief An operator */ +int operator""_op(unsigned long long); + +/** @brief Another operator */ +int operator "" _oq(unsigned long long); + +/** @brief Function */ +void foo(std::initializer_list); + +} -- cgit v0.12