From: Cris Luengo Date: Tue, 7 May 2019 05:54:19 +0000 (-0600) Subject: documentation: test issues with duplicate detailed descriptions. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=eede7c0e563d183d95e5207de198cc30117a5ea7;p=blog.git documentation: test issues with duplicate detailed descriptions. Also shows issues that come up when groups (modules) are spread over multiple files. --- diff --git a/documentation/test_doxygen/compound_modules_in_namespace/Doxyfile b/documentation/test_doxygen/compound_modules_in_namespace/Doxyfile new file mode 100644 index 00000000..2eaac3ed --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/Doxyfile @@ -0,0 +1,14 @@ +INPUT = file1.h file2.h file3.h +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES +XML_PROGRAMLISTING = NO +XML_NS_MEMB_FILE_SCOPE = YES + +##! M_PAGE_FINE_PRINT = +##! M_THEME_COLOR = +##! M_FAVICON = +##! M_LINKS_NAVBAR1 = +##! M_LINKS_NAVBAR2 = +##! M_SEARCH_DISABLED = YES diff --git a/documentation/test_doxygen/compound_modules_in_namespace/file1.h b/documentation/test_doxygen/compound_modules_in_namespace/file1.h new file mode 100644 index 00000000..7a930c15 --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/file1.h @@ -0,0 +1,48 @@ +/** @file + * @brief Include file for group 1 + */ + +/** +@brief A namespace + +This is a namespace. It is spread across two files. +*/ +namespace Namespace { + +/** + * @defgroup group1 First group + * @brief The first group, containing two functions + * @{ + */ + +/** +@brief A function + +With detailed description. +*/ +void function1(); + +/** +@brief Another function + +Also with detailed description. +*/ +void function2(); + +/** +@brief A typedef + +With details. +*/ +typedef int FooBar; + +/** +@brief A variable + +Detailed description. +*/ +constexpr FooBar FizzBuzz = 5; + +/*@}*/ + +} diff --git a/documentation/test_doxygen/compound_modules_in_namespace/file2.h b/documentation/test_doxygen/compound_modules_in_namespace/file2.h new file mode 100644 index 00000000..499247ae --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/file2.h @@ -0,0 +1,35 @@ +/** @file + * @brief Include file for group 2 + */ + +namespace Namespace { + +/** @defgroup group2 Second group + * @brief The second group, containing some more functions + * @{ + */ + +/** +@brief Yet another function + +With detailed description. +*/ +void function3(); + +/** +@brief And even more functions + +Also with detailed description. +*/ +void function4(); + +/** +@brief An enum + +With details. +*/ +enum Enum {}; + +/*@}*/ + +} diff --git a/documentation/test_doxygen/compound_modules_in_namespace/file3.h b/documentation/test_doxygen/compound_modules_in_namespace/file3.h new file mode 100644 index 00000000..6cd8e46f --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/file3.h @@ -0,0 +1,28 @@ +/** @file + * @brief Include file with some stuff that belongs to group 1 and group 2 + */ + +namespace Namespace { + +/** @ingroup group2 +@brief Lets define yet another function + +Also with detailed description. +*/ +void anotherFunction(); + +/** @ingroup group1 +@brief And another function here + +Also with detailed description. +*/ +void moreFunction(); + +/** @ingroup group2 +@brief A define + +With details. +*/ +#define A_DEFINE + +} diff --git a/documentation/test_doxygen/compound_modules_in_namespace/file3_8h.html b/documentation/test_doxygen/compound_modules_in_namespace/file3_8h.html new file mode 100644 index 00000000..748410b1 --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/file3_8h.html @@ -0,0 +1,73 @@ + + + + + file3.h file | My Project + + + + + +
+
+ + diff --git a/documentation/test_doxygen/compound_modules_in_namespace/group__group1.html b/documentation/test_doxygen/compound_modules_in_namespace/group__group1.html new file mode 100644 index 00000000..4a297679 --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/group__group1.html @@ -0,0 +1,127 @@ + + + + + First group module | My Project + + + + + +
+
+
+
+
+

+ First group module

+

The first group, containing two functions.

+
+

Contents

+ +
+
+

Typedefs

+
+
+ using FooBar = int +
+
A typedef.
+
+
+
+

Functions

+
+
+ void function1() +
+
A function.
+
+ void function2() +
+
Another function.
+
+ void moreFunction() +
+
And another function here.
+
+
+
+

Variables

+
+
+ FooBar FizzBuzz constexpr +
+
A variable.
+
+
+
+

Typedef documentation

+
+

+ typedef int FooBar +
#include <file1.h>
+

+

A typedef.

+

With details.

+
+
+
+

Function documentation

+
+

+ void function1() +
#include <file1.h>
+

+

A function.

+

With detailed description.

+
+
+

+ void function2() +
#include <file1.h>
+

+

Another function.

+

Also with detailed description.

+
+
+

+ void moreFunction() +
#include <file3.h>
+

+

And another function here.

+

Also with detailed description.

+
+
+
+

Variable documentation

+
+

+ FooBar FizzBuzz constexpr +
#include <file1.h>
+

+

A variable.

+

Detailed description.

+
+
+
+
+
+
+ + diff --git a/documentation/test_doxygen/compound_modules_in_namespace/group__group2.html b/documentation/test_doxygen/compound_modules_in_namespace/group__group2.html new file mode 100644 index 00000000..4eb2cd63 --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/group__group2.html @@ -0,0 +1,127 @@ + + + + + Second group module | My Project + + + + + +
+
+
+
+
+

+ Second group module

+

The second group, containing some more functions.

+
+

Contents

+ +
+
+

Enums

+
+
+ enum Enum { } +
+
An enum.
+
+
+
+

Functions

+
+
+ void function3() +
+
Yet another function.
+
+ void function4() +
+
And even more functions.
+
+ void anotherFunction() +
+
Lets define yet another function.
+
+
+
+

Defines

+
+
+ #define A_DEFINE +
+
A define.
+
+
+
+

Enum documentation

+
+

+ enum Enum +
#include <file2.h>
+

+

An enum.

+

With details.

+
+
+
+

Function documentation

+
+

+ void function3() +
#include <file2.h>
+

+

Yet another function.

+

With detailed description.

+
+
+

+ void function4() +
#include <file2.h>
+

+

And even more functions.

+

Also with detailed description.

+
+
+

+ void anotherFunction() +
#include <file3.h>
+

+

Lets define yet another function.

+

Also with detailed description.

+
+
+
+

Define documentation

+
+

+ #define A_DEFINE +
#include <file3.h>
+

+

A define.

+

With details.

+
+
+
+
+
+
+ + diff --git a/documentation/test_doxygen/compound_modules_in_namespace/namespaceNamespace.html b/documentation/test_doxygen/compound_modules_in_namespace/namespaceNamespace.html new file mode 100644 index 00000000..e431e116 --- /dev/null +++ b/documentation/test_doxygen/compound_modules_in_namespace/namespaceNamespace.html @@ -0,0 +1,102 @@ + + + + + Namespace namespace | My Project + + + + + +
+
+
+
+
+

+ Namespace namespace +

+

A namespace.

+
+

Contents

+ +
+

This is a namespace. It is spread across two files.

+
+

Enums

+
+
+ enum Enum { } +
+
An enum.
+
+
+
+

Typedefs

+
+
+ using FooBar = int +
+
A typedef.
+
+
+
+

Functions

+
+
+ void function1() +
+
A function.
+
+ void function2() +
+
Another function.
+
+ void function3() +
+
Yet another function.
+
+ void function4() +
+
And even more functions.
+
+ void anotherFunction() +
+
Lets define yet another function.
+
+ void moreFunction() +
+
And another function here.
+
+
+
+

Variables

+
+
+ FooBar FizzBuzz constexpr +
+
A variable.
+
+
+
+
+
+
+ + diff --git a/documentation/test_doxygen/test_compound.py b/documentation/test_doxygen/test_compound.py index 85af5ba4..15422e0c 100644 --- a/documentation/test_doxygen/test_compound.py +++ b/documentation/test_doxygen/test_compound.py @@ -153,6 +153,17 @@ class Modules(IntegrationTestCase): self.assertEqual(*self.actual_expected_contents('group__subgroup.html')) self.assertEqual(*self.actual_expected_contents('modules.html')) +class ModulesInNamespace(IntegrationTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, 'modules_in_namespace', *args, **kwargs) + + def test(self): + self.run_doxygen(wildcard='*.xml') + self.assertEqual(*self.actual_expected_contents('group__group1.html')) + self.assertEqual(*self.actual_expected_contents('group__group2.html')) + self.assertEqual(*self.actual_expected_contents('namespaceNamespace.html')) + self.assertEqual(*self.actual_expected_contents('file3_8h.html')) + class Deprecated(IntegrationTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, 'deprecated', *args, **kwargs)