From 70ce401095302b1190bf193797707290492cf9f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Dec 2017 14:46:12 +0100 Subject: [PATCH] doxygen: split out tests that depend on unreleased Doxygen features. --- doxygen/test/__init__.py | 3 + doxygen/test/compound_detailed/File.h | 17 +-- .../test/compound_detailed/namespaceType.html | 25 ---- .../compound_detailed/structTemplate.html | 25 +--- .../test/compound_listing/Directory/File.h | 4 +- .../compound_listing/Directory/Sub/Class.h | 8 +- ...lassRoot_1_1Directory_1_1Sub_1_1Class.html | 12 +- doxygen/test/compound_listing/input.dox | 18 --- .../namespaceRoot_1_1Directory.html | 4 +- doxygen/test/contents_code/index.html | 6 +- doxygen/test/contents_code/input.dox | 41 +----- doxygen/test/contents_code/warnings.html | 4 +- doxygen/test/contents_code_language/Doxyfile | 8 ++ doxygen/test/contents_code_language/ansi.html | 55 ++++++++ doxygen/test/contents_code_language/code.sh | 4 + .../test/contents_code_language/index.html | 60 +++++++++ doxygen/test/contents_code_language/input.dox | 53 ++++++++ .../snippet.cpp | 0 .../test/contents_code_language/warnings.html | 56 ++++++++ doxygen/test/cpp_enum_class/Doxyfile | 8 ++ doxygen/test/cpp_enum_class/File.h | 18 +++ doxygen/test/cpp_enum_class/File_8h.html | 123 ++++++++++++++++++ doxygen/test/cpp_template_alias/Doxyfile | 8 ++ doxygen/test/cpp_template_alias/File.h | 20 +++ doxygen/test/cpp_template_alias/File_8h.html | 110 ++++++++++++++++ .../cpp_template_alias/structTemplate.html | 102 +++++++++++++++ .../Doxyfile | 0 .../input.dox | 0 .../page-a.html | 0 .../page-b.html | 0 doxygen/test/page_brief/pages.html | 71 ++++++++++ doxygen/test/page_toc/Doxyfile | 7 + doxygen/test/page_toc/input.dox | 17 +++ .../page-toc.html | 0 doxygen/test/test_compound.py | 4 - doxygen/test/test_contents.py | 27 +++- doxygen/test/test_cpp.py | 26 ++++ doxygen/test/test_page.py | 25 +++- 38 files changed, 832 insertions(+), 137 deletions(-) create mode 100644 doxygen/test/contents_code_language/Doxyfile create mode 100644 doxygen/test/contents_code_language/ansi.html create mode 100644 doxygen/test/contents_code_language/code.sh create mode 100644 doxygen/test/contents_code_language/index.html create mode 100644 doxygen/test/contents_code_language/input.dox rename doxygen/test/{contents_code => contents_code_language}/snippet.cpp (100%) create mode 100644 doxygen/test/contents_code_language/warnings.html create mode 100644 doxygen/test/cpp_enum_class/Doxyfile create mode 100644 doxygen/test/cpp_enum_class/File.h create mode 100644 doxygen/test/cpp_enum_class/File_8h.html create mode 100644 doxygen/test/cpp_template_alias/Doxyfile create mode 100644 doxygen/test/cpp_template_alias/File.h create mode 100644 doxygen/test/cpp_template_alias/File_8h.html create mode 100644 doxygen/test/cpp_template_alias/structTemplate.html rename doxygen/test/{page_duplicated_brief => page_brief}/Doxyfile (100%) rename doxygen/test/{page_duplicated_brief => page_brief}/input.dox (100%) rename doxygen/test/{page_duplicated_brief => page_brief}/page-a.html (100%) rename doxygen/test/{page_duplicated_brief => page_brief}/page-b.html (100%) create mode 100644 doxygen/test/page_brief/pages.html create mode 100644 doxygen/test/page_toc/Doxyfile create mode 100644 doxygen/test/page_toc/input.dox rename doxygen/test/{compound_listing => page_toc}/page-toc.html (100%) create mode 100644 doxygen/test/test_cpp.py diff --git a/doxygen/test/__init__.py b/doxygen/test/__init__.py index 1ec23d5f..96dc7b4f 100644 --- a/doxygen/test/__init__.py +++ b/doxygen/test/__init__.py @@ -6,6 +6,9 @@ import xml.etree.ElementTree as ET from dox2html5 import run, default_templates, default_wildcard, default_index_pages +def doxygen_version(): + return subprocess.check_output(['doxygen', '-v']).decode('utf-8').strip() + class IntegrationTestCase(unittest.TestCase): def __init__(self, path, dir, *args, **kwargs): unittest.TestCase.__init__(self, *args, **kwargs) diff --git a/doxygen/test/compound_detailed/File.h b/doxygen/test/compound_detailed/File.h index f6249770..71cd3f1b 100644 --- a/doxygen/test/compound_detailed/File.h +++ b/doxygen/test/compound_detailed/File.h @@ -32,7 +32,7 @@ template struct Template { * Should have just one template with _3 for unnamed parameter. Should * also have the `protected` label in the details. */ - enum class Bar {}; + enum Bar {}; /** * @brief Typedef @@ -44,12 +44,13 @@ template struct Template { /** * @brief Template alias - * @tparam V Well, this is V as well * - * Should include both template lists, with _3 for unnamed parameter. - * Should also have the `protected` label in the details. + * Should have just one template with _3 for unnamed parameter. Should + * also have the `protected` label in the details. Template parameters + * are tested in `cpp_template_aliases` test as they need newer + * Doxygen. */ - template using Foo = Buuu; + using Foo = Buuu; /** * @brief Function @@ -138,12 +139,6 @@ enum { namespace Type { -/** -@brief A templated type with just template details -@tparam T Template param -*/ -template using Foo = Bar; - /** @brief Another typedef diff --git a/doxygen/test/compound_detailed/namespaceType.html b/doxygen/test/compound_detailed/namespaceType.html index 8de1fbd8..9898c225 100644 --- a/doxygen/test/compound_detailed/namespaceType.html +++ b/doxygen/test/compound_detailed/namespaceType.html @@ -49,11 +49,6 @@

Typedefs

-
-
template<class T, typename = void>
- using Foo = Bar<T, int> -
-
A templated type with just template details.
using Ugly = Me
@@ -66,26 +61,6 @@

Typedef documentation

-
-

-
- template<class T, typename = void> -
- using Type::Foo = Bar<T, int> -

-

A templated type with just template details.

- - - - - - - - - - -
Template parameters
TTemplate param
-

typedef Me Type::Ugly diff --git a/doxygen/test/compound_detailed/structTemplate.html b/doxygen/test/compound_detailed/structTemplate.html index 44052a8a..bf2418f2 100644 --- a/doxygen/test/compound_detailed/structTemplate.html +++ b/doxygen/test/compound_detailed/structTemplate.html @@ -82,7 +82,7 @@

Protected types

- enum class Bar { } + enum Bar { }
Enum.
@@ -90,8 +90,7 @@
Typedef.
-
template<class V, bool = false>
- using Foo = Buuu<V, false> + using Foo = Buuu<U, false>
Template alias.
@@ -120,7 +119,7 @@
template<class T, class U, class _3>
- enum class Template<T, U, _3>::Bar protected + enum Template<T, U, _3>::Bar protected

Enum.

Should have just one template with _3 for unnamed parameter. Should also have the protected label in the details.

@@ -138,27 +137,15 @@

Typedef.

Should have just one template with _3 for unnamed parameter. Should also have the protected label in the details.

-
+

template<class T, class U, class _3> - template<class V, bool = false>
- using Template<T, U, _3>::Foo = Buuu<V, false> protected + using Template<T, U, _3>::Foo = Buuu<U, false> protected

Template alias.

- - - - - - - - - - -
Template parameters
VWell, this is V as well
-

Should include both template lists, with _3 for unnamed parameter. Should also have the protected label in the details.

+

Should have just one template with _3 for unnamed parameter. Should also have the protected label in the details. Template parameters are tested in cpp_template_aliases test as they need newer Doxygen.

diff --git a/doxygen/test/compound_listing/Directory/File.h b/doxygen/test/compound_listing/Directory/File.h index bdbbadba..d86f907c 100644 --- a/doxygen/test/compound_listing/Directory/File.h +++ b/doxygen/test/compound_listing/Directory/File.h @@ -14,7 +14,7 @@ struct Struct {}; union Union {}; /** @brief An enum */ -enum class Enum: int {}; +enum Enum {}; /** @brief A typedef */ typedef int Int; @@ -31,7 +31,7 @@ void foo(); /** @{ @name A group */ /** @brief Flag in a group */ -enum class Flag {}; +enum Flag {}; /** @brief Alias in a group */ using Main = void; diff --git a/doxygen/test/compound_listing/Directory/Sub/Class.h b/doxygen/test/compound_listing/Directory/Sub/Class.h index e91c2ed4..52d468e5 100644 --- a/doxygen/test/compound_listing/Directory/Sub/Class.h +++ b/doxygen/test/compound_listing/Directory/Sub/Class.h @@ -29,7 +29,7 @@ class Class { typedef void(*Deleter)(int, void*); /** @brief A enum value */ - enum E: int { FooBar = 3 }; + enum E { FooBar = 3 }; /** @brief A public static var */ constexpr static int Size = 0; @@ -66,7 +66,7 @@ class Class { using Type = double; /** @brief Protected enum */ - enum class Boolean { + enum Boolean { True, False, FileNotFound }; @@ -88,7 +88,7 @@ class Class { /** @{ @name Group full of non-public stuff which should be marked as such */ /** @brief Protected flag in a group */ - enum class Flag {}; + enum Flag {}; /** @brief Protected alias in a group */ using Main = void; @@ -121,7 +121,7 @@ class Class { /** @relatedalso Class * @brief An enum */ -enum class Enum: int {}; +enum Enum {}; /** @relatedalso Class * @brief A typedef diff --git a/doxygen/test/compound_listing/classRoot_1_1Directory_1_1Sub_1_1Class.html b/doxygen/test/compound_listing/classRoot_1_1Directory_1_1Sub_1_1Class.html index 3959daeb..cbf20449 100644 --- a/doxygen/test/compound_listing/classRoot_1_1Directory_1_1Sub_1_1Class.html +++ b/doxygen/test/compound_listing/classRoot_1_1Directory_1_1Sub_1_1Class.html @@ -84,7 +84,7 @@
A public subclass.
- enum E: int { FooBar = 3 } + enum E { FooBar = 3 }
A enum value.
@@ -156,9 +156,9 @@
A protected subclass.
- enum class Boolean { True, - False, - FileNotFound } + enum Boolean { True, + False, + FileNotFound }
Protected enum.
@@ -212,7 +212,7 @@

Group full of non-public stuff which should be marked as such

- enum class Flag { } protected + enum Flag { } protected
Protected flag in a group.
@@ -235,7 +235,7 @@

Related

- enum class Enum: int { } + enum Enum { }
An enum.
diff --git a/doxygen/test/compound_listing/input.dox b/doxygen/test/compound_listing/input.dox index 8aeef795..dc3beeae 100644 --- a/doxygen/test/compound_listing/input.dox +++ b/doxygen/test/compound_listing/input.dox @@ -23,24 +23,6 @@ * @brief Another namespace */ -/** @page page-toc Page with TOC - -@tableofcontents - -@section section A section - -Text. - -@subsection sub-section Subsection - -@subsection sub-section2 Subsection 2 - -@subsubsection sub-section3 Subsection 3 - -@section section2 Section 2 - -*/ - /** @page page-no-toc Page without TOC @section section-notoc A section that doesn't go into TOC diff --git a/doxygen/test/compound_listing/namespaceRoot_1_1Directory.html b/doxygen/test/compound_listing/namespaceRoot_1_1Directory.html index ce4ac51c..03d219b4 100644 --- a/doxygen/test/compound_listing/namespaceRoot_1_1Directory.html +++ b/doxygen/test/compound_listing/namespaceRoot_1_1Directory.html @@ -81,7 +81,7 @@

Enums

- enum class Enum: int { } + enum Enum { }
An enum.
@@ -119,7 +119,7 @@

A group

- enum class Flag { } + enum Flag { }
Flag in a group.
diff --git a/doxygen/test/contents_code/index.html b/doxygen/test/contents_code/index.html index 53b29554..6f05c43a 100644 --- a/doxygen/test/contents_code/index.html +++ b/doxygen/test/contents_code/index.html @@ -38,13 +38,11 @@ My Project
// A code block.
-// Spanning multiple lines.
// Special handling of some extensions

Inline=code at the start of a line. Then a code that is inside of cd dir a text, should be delimited by spaces. But not when it is in (alert('www');) parentheses.

![mosra@don-perverzo m.css]$ 
{
+// Spanning multiple lines.

Inline=code; at the start of a line. Then a code that is inside of true || false a text, should be delimited by spaces. But not when it is in (std::exit(2);) parentheses.

{
     // a block
         // that is indented
     // but has a lot of trailing whitespace which should be removed
-}

Look:

void foo() { return; }

A paragraph following a one line snippet should not be merged with it.

void foo() { return; }

This one also not.

#include <cmath>
-
-void bar() { return; }

And this should not produce a warning.

Another paragraph.

Code block inside a list (has to be done using HTML):

  • A paragraph.

    #include <os>
  • Another paragraph.

    Yet another

  • A single paragraph, rendered without the wrapping tag
+}

Code block inside a list (has to be done using HTML):

  • A paragraph.

    #include <os>
  • Another paragraph.

    Yet another

  • A single paragraph, rendered without the wrapping tag
diff --git a/doxygen/test/contents_code/input.dox b/doxygen/test/contents_code/input.dox index e4cab6c1..76aa4b63 100644 --- a/doxygen/test/contents_code/input.dox +++ b/doxygen/test/contents_code/input.dox @@ -5,17 +5,9 @@ // Spanning multiple lines. @endcode -@code{.glsl} -// Special handling of some extensions -@endcode - -@code{.ini} Inline=code @endcode at the start of a line. Then a code that -is inside of @code{.sh} cd dir @endcode a text, should be delimited by spaces. -But not when it is in (@code{.js} alert('www'); @endcode) parentheses. - -@code{.ansi} -![mosra@don-perverzo m.css]$  -@endcode +@code{.cpp} Inline=code; @endcode at the start of a line. Then a code that +is inside of @code{.cpp} true || false @endcode a text, should be delimited by +spaces. But not when it is in (@code{.cpp} std::exit(2); @endcode) parentheses. @code{.cpp} { @@ -29,23 +21,6 @@ But not when it is in (@code{.js} alert('www'); @endcode) parentheses. @endcode -Look: - -@snippet snippet.cpp 0 - -A paragraph following a one line snippet should not be merged with it. - -@snippet snippet.cpp 0 -

- -This one also not. - -@snippet snippet.cpp 1 - -And this should not produce a warning. - -Another paragraph. - Code block inside a list (has to be done using HTML):

    @@ -74,13 +49,9 @@ Code block inside a list (has to be done using HTML): @endcode A paragraph. -@code{.ini} -Multi=line -code=that is a part of a paragraph. -@endcode - -@code{.whatthehell} -Code that has unrecognizable format. +@code{.cpp} +multi=line; +code="that is a part of a paragraph."; @endcode Improper code block inside a list that needs to be extracted out: diff --git a/doxygen/test/contents_code/warnings.html b/doxygen/test/contents_code/warnings.html index f8af16be..414b2746 100644 --- a/doxygen/test/contents_code/warnings.html +++ b/doxygen/test/contents_code/warnings.html @@ -38,8 +38,8 @@ Code that produces warnings
    // Code without language
    -// description

    A paragraph.

    Multi=line
    -code=that is a part of a paragraph.
    Code that has unrecognizable format.

    Improper code block inside a list that needs to be extracted out:

    • A paragraph.

      #include <os>
      +// description

      A paragraph.

      multi=line;
      +code="that is a part of a paragraph.";

      Improper code block inside a list that needs to be extracted out:

      • A paragraph.

        #include <os>
         // hello again
      diff --git a/doxygen/test/contents_code_language/Doxyfile b/doxygen/test/contents_code_language/Doxyfile new file mode 100644 index 00000000..a316231b --- /dev/null +++ b/doxygen/test/contents_code_language/Doxyfile @@ -0,0 +1,8 @@ +INPUT = input.dox +EXAMPLE_PATH = . +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES + +M_SHOW_DOXYGEN_VERSION = NO diff --git a/doxygen/test/contents_code_language/ansi.html b/doxygen/test/contents_code_language/ansi.html new file mode 100644 index 00000000..ae7854f1 --- /dev/null +++ b/doxygen/test/contents_code_language/ansi.html @@ -0,0 +1,55 @@ + + + + + ANSI color escape code highlighting | My Project + + + + + + +
      +
      +
      +
      +
      +

      + ANSI color escape code highlighting +

      +
      ![mosra@don-perverzo m.css]$ 
      +
      +
      +
      +
      + + + diff --git a/doxygen/test/contents_code_language/code.sh b/doxygen/test/contents_code_language/code.sh new file mode 100644 index 00000000..36fc52db --- /dev/null +++ b/doxygen/test/contents_code_language/code.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +if [ -d '/user' ]; then echo "Hello"; fi +false diff --git a/doxygen/test/contents_code_language/index.html b/doxygen/test/contents_code_language/index.html new file mode 100644 index 00000000..454e18a5 --- /dev/null +++ b/doxygen/test/contents_code_language/index.html @@ -0,0 +1,60 @@ + + + + + My Project | My Project + + + + + + +
      +
      +
      +
      +
      +

      + My Project +

      +
      // Special handling of some extensions

      Inline=code of different cd dir languages.

      Code file with a custom language:

      #!/bin/bash
      +
      +if [ -d '/user' ]; then echo "Hello"; fi
      +false

      Look:

      void foo() { return; }

      A paragraph following a one line snippet should not be merged with it.

      void foo() { return; }

      This one also not.

      #include <cmath>
      +
      +void bar() { return; }

      And this should not produce a warning.

      Another paragraph.

      +
      +
      +
      +
      + + + diff --git a/doxygen/test/contents_code_language/input.dox b/doxygen/test/contents_code_language/input.dox new file mode 100644 index 00000000..12e19820 --- /dev/null +++ b/doxygen/test/contents_code_language/input.dox @@ -0,0 +1,53 @@ +/** @mainpage + +@code{.glsl} +// Special handling of some extensions +@endcode + +@code{.ini} Inline=code @endcode of different @code{.sh} cd dir @endcode +languages. + +Code file with a custom language: + +@include code.sh + +Look: + +@snippet snippet.cpp 0 + +A paragraph following a one line snippet should not be merged with it. + +@snippet snippet.cpp 0 +

      + +This one also not. + +@snippet snippet.cpp 1 + +And this should not produce a warning. + +Another paragraph. + +*/ + +/** @page ansi ANSI color escape code highlighting + +@code{.ansi} +![mosra@don-perverzo m.css]$  +@endcode + +*/ + +/** @page warnings Code that produces warnings + +@code +// Code without language +// description +@endcode + +@code{.whatthehell} +Code that has unrecognizable format. +@endcode + +*/ + diff --git a/doxygen/test/contents_code/snippet.cpp b/doxygen/test/contents_code_language/snippet.cpp similarity index 100% rename from doxygen/test/contents_code/snippet.cpp rename to doxygen/test/contents_code_language/snippet.cpp diff --git a/doxygen/test/contents_code_language/warnings.html b/doxygen/test/contents_code_language/warnings.html new file mode 100644 index 00000000..0aaeaed3 --- /dev/null +++ b/doxygen/test/contents_code_language/warnings.html @@ -0,0 +1,56 @@ + + + + + Code that produces warnings | My Project + + + + + + +

      +
      +
      +
      +
      +

      + Code that produces warnings +

      +
      // Code without language
      +// description
      Code that has unrecognizable format.
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/doxygen/test/cpp_enum_class/Doxyfile b/doxygen/test/cpp_enum_class/Doxyfile new file mode 100644 index 00000000..29eb753c --- /dev/null +++ b/doxygen/test/cpp_enum_class/Doxyfile @@ -0,0 +1,8 @@ +INPUT = File.h +AUTOLINK_SUPPORT = NO +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES + +M_SHOW_DOXYGEN_VERSION = NO diff --git a/doxygen/test/cpp_enum_class/File.h b/doxygen/test/cpp_enum_class/File.h new file mode 100644 index 00000000..2b19e5f2 --- /dev/null +++ b/doxygen/test/cpp_enum_class/File.h @@ -0,0 +1,18 @@ +/** @file + * @brief A file. + */ + +/** @brief Strongly-typed enum */ +enum class Boolean: unsigned char { + True = 7, /**< True. */ + False, /**< False? */ + FileNotFound = -1 /**< Haha. */ +}; + +/** @brief Typed enum */ +enum E: int { + Value = 42 /**< Value */ +}; + +/** @brief Strong implicitly typed enum */ +enum class F {}; diff --git a/doxygen/test/cpp_enum_class/File_8h.html b/doxygen/test/cpp_enum_class/File_8h.html new file mode 100644 index 00000000..09347bc9 --- /dev/null +++ b/doxygen/test/cpp_enum_class/File_8h.html @@ -0,0 +1,123 @@ + + + + + File.h file | My Project + + + + + + +
      +
      +
      +
      +
      +

      + File.h file +

      +

      A file.

      +
      +

      Enums

      +
      +
      + enum class Boolean: unsigned char { True = 7, + False, + FileNotFound = -1 } +
      +
      Strongly-typed enum.
      +
      + enum E: int { Value = 42 } +
      +
      Typed enum.
      +
      + enum class F { } +
      +
      Strong implicitly typed enum.
      +
      +
      +
      +

      Enum documentation

      +
      +

      + enum class Boolean: unsigned char +

      +

      Strongly-typed enum.

      + + + + + + + + + + + + + + + + +
      Enumerators
      True +

      True.

      +
      False +

      False?

      +
      FileNotFound +

      Haha.

      +
      +
      +
      +

      + enum E: int +

      +

      Typed enum.

      + + + + + + + + +
      Enumerators
      Value +

      Value

      +
      +
      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/doxygen/test/cpp_template_alias/Doxyfile b/doxygen/test/cpp_template_alias/Doxyfile new file mode 100644 index 00000000..29eb753c --- /dev/null +++ b/doxygen/test/cpp_template_alias/Doxyfile @@ -0,0 +1,8 @@ +INPUT = File.h +AUTOLINK_SUPPORT = NO +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES + +M_SHOW_DOXYGEN_VERSION = NO diff --git a/doxygen/test/cpp_template_alias/File.h b/doxygen/test/cpp_template_alias/File.h new file mode 100644 index 00000000..5d25f175 --- /dev/null +++ b/doxygen/test/cpp_template_alias/File.h @@ -0,0 +1,20 @@ +/** @file + * @brief A file. + */ + +/** @brief Class with template parameters */ +template struct Template { + /** + * @brief Template alias + * @tparam V Well, this is V as well + * + * Should include both template lists, with _3 for unnamed parameter. + */ + template using Foo = Buuu; +}; + +/** +@brief A templated type with just template details +@tparam T Template param +*/ +template using Foo = Bar; diff --git a/doxygen/test/cpp_template_alias/File_8h.html b/doxygen/test/cpp_template_alias/File_8h.html new file mode 100644 index 00000000..00b3d23a --- /dev/null +++ b/doxygen/test/cpp_template_alias/File_8h.html @@ -0,0 +1,110 @@ + + + + + File.h file | My Project + + + + + + +
      +
      +
      +
      +
      +

      + File.h file +

      +

      A file.

      +
      +

      Contents

      + +
      +
      +

      Classes

      +
      +
      +
      template<class T, class U = void, class = int>
      + struct Template +
      +
      Class with template parameters.
      +
      +
      +
      +

      Typedefs

      +
      +
      +
      template<class T, typename = void>
      + using Foo = Bar<T, int> +
      +
      A templated type with just template details.
      +
      +
      +
      +

      Typedef documentation

      +
      +

      +
      + template<class T, typename = void> +
      + using Foo = Bar<T, int> +

      +

      A templated type with just template details.

      + + + + + + + + + + +
      Template parameters
      TTemplate param
      +
      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/doxygen/test/cpp_template_alias/structTemplate.html b/doxygen/test/cpp_template_alias/structTemplate.html new file mode 100644 index 00000000..0bfeb7ca --- /dev/null +++ b/doxygen/test/cpp_template_alias/structTemplate.html @@ -0,0 +1,102 @@ + + + + + Template struct | My Project + + + + + + +
      +
      +
      +
      +
      +

      +
      template<class T, class U = void, class = int>
      + Template struct +

      +

      Class with template parameters.

      +
      +

      Contents

      + +
      +
      +

      Public types

      +
      +
      +
      template<class V, bool = false>
      + using Foo = Buuu<V, false> +
      +
      Template alias.
      +
      +
      +
      +

      Typedef documentation

      +
      +

      +
      + template<class T, class U, class _3> + template<class V, bool = false> +
      + using Template<T, U, _3>::Foo = Buuu<V, false> +

      +

      Template alias.

      + + + + + + + + + + +
      Template parameters
      VWell, this is V as well
      +

      Should include both template lists, with _3 for unnamed parameter.

      +
      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/doxygen/test/page_duplicated_brief/Doxyfile b/doxygen/test/page_brief/Doxyfile similarity index 100% rename from doxygen/test/page_duplicated_brief/Doxyfile rename to doxygen/test/page_brief/Doxyfile diff --git a/doxygen/test/page_duplicated_brief/input.dox b/doxygen/test/page_brief/input.dox similarity index 100% rename from doxygen/test/page_duplicated_brief/input.dox rename to doxygen/test/page_brief/input.dox diff --git a/doxygen/test/page_duplicated_brief/page-a.html b/doxygen/test/page_brief/page-a.html similarity index 100% rename from doxygen/test/page_duplicated_brief/page-a.html rename to doxygen/test/page_brief/page-a.html diff --git a/doxygen/test/page_duplicated_brief/page-b.html b/doxygen/test/page_brief/page-b.html similarity index 100% rename from doxygen/test/page_duplicated_brief/page-b.html rename to doxygen/test/page_brief/page-b.html diff --git a/doxygen/test/page_brief/pages.html b/doxygen/test/page_brief/pages.html new file mode 100644 index 00000000..63eac88a --- /dev/null +++ b/doxygen/test/page_brief/pages.html @@ -0,0 +1,71 @@ + + + + + My Project + + + + + + +
      +
      +
      +
      +
      +

      Pages

      +
        +
      • A page Brief docs for a page.
      • +
      • Page B Brief with a period.
      • +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/doxygen/test/page_toc/Doxyfile b/doxygen/test/page_toc/Doxyfile new file mode 100644 index 00000000..d64a2386 --- /dev/null +++ b/doxygen/test/page_toc/Doxyfile @@ -0,0 +1,7 @@ +INPUT = input.dox +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES + +M_SHOW_DOXYGEN_VERSION = NO diff --git a/doxygen/test/page_toc/input.dox b/doxygen/test/page_toc/input.dox new file mode 100644 index 00000000..28d143d2 --- /dev/null +++ b/doxygen/test/page_toc/input.dox @@ -0,0 +1,17 @@ +/** @page page-toc Page with TOC + +@tableofcontents + +@section section A section + +Text. + +@subsection sub-section Subsection + +@subsection sub-section2 Subsection 2 + +@subsubsection sub-section3 Subsection 3 + +@section section2 Section 2 + +*/ diff --git a/doxygen/test/compound_listing/page-toc.html b/doxygen/test/page_toc/page-toc.html similarity index 100% rename from doxygen/test/compound_listing/page-toc.html rename to doxygen/test/page_toc/page-toc.html diff --git a/doxygen/test/test_compound.py b/doxygen/test/test_compound.py index 971125f9..d6741019 100644 --- a/doxygen/test/test_compound.py +++ b/doxygen/test/test_compound.py @@ -48,10 +48,6 @@ class Listing(IntegrationTestCase): self.run_dox2html5(wildcard='union*Bar*.xml') self.assertFalse(os.path.exists(os.path.join(self.path, 'html', 'unionRoot_1_1Directory_1_1Sub_1_1Class_1_1Bar.html'))) - def test_page_toc(self): - self.run_dox2html5(wildcard='page-toc.xml') - self.assertEqual(*self.actual_expected_contents('page-toc.html')) - def test_page_no_toc(self): self.run_dox2html5(wildcard='page-no-toc.xml') self.assertEqual(*self.actual_expected_contents('page-no-toc.html')) diff --git a/doxygen/test/test_contents.py b/doxygen/test/test_contents.py index deba4b8a..8659939f 100644 --- a/doxygen/test/test_contents.py +++ b/doxygen/test/test_contents.py @@ -1,6 +1,9 @@ import os +import unittest -from test import IntegrationTestCase +from distutils.version import LooseVersion + +from test import IntegrationTestCase, doxygen_version class Typography(IntegrationTestCase): def __init__(self, *args, **kwargs): @@ -38,6 +41,28 @@ class Code(IntegrationTestCase): self.run_dox2html5(wildcard='warnings.xml') self.assertEqual(*self.actual_expected_contents('warnings.html')) +class CodeLanguage(IntegrationTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, 'code_language', *args, **kwargs) + + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/621") + def test(self): + self.run_dox2html5(wildcard='indexpage.xml') + self.assertEqual(*self.actual_expected_contents('index.html')) + + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/623") + def test_ansi(self): + self.run_dox2html5(wildcard='ansi.xml') + self.assertEqual(*self.actual_expected_contents('ansi.html')) + + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/621") + def test_warnings(self): + self.run_dox2html5(wildcard='warnings.xml') + self.assertEqual(*self.actual_expected_contents('warnings.html')) + class Image(IntegrationTestCase): def __init__(self, *args, **kwargs): super().__init__(__file__, 'image', *args, **kwargs) diff --git a/doxygen/test/test_cpp.py b/doxygen/test/test_cpp.py new file mode 100644 index 00000000..a352f311 --- /dev/null +++ b/doxygen/test/test_cpp.py @@ -0,0 +1,26 @@ +import unittest + +from distutils.version import LooseVersion + +from test import IntegrationTestCase, doxygen_version + +class EnumClass(IntegrationTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, 'enum_class', *args, **kwargs) + + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/627") + def test(self): + self.run_dox2html5(wildcard='File_8h.xml') + self.assertEqual(*self.actual_expected_contents('File_8h.html')) + +class TemplateAlias(IntegrationTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, 'template_alias', *args, **kwargs) + + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/626") + def test(self): + self.run_dox2html5(wildcard='*.xml') + self.assertEqual(*self.actual_expected_contents('File_8h.html')) + self.assertEqual(*self.actual_expected_contents('structTemplate.html')) diff --git a/doxygen/test/test_page.py b/doxygen/test/test_page.py index b4cf416b..e660b792 100644 --- a/doxygen/test/test_page.py +++ b/doxygen/test/test_page.py @@ -1,4 +1,8 @@ -from test import IntegrationTestCase +import unittest + +from distutils.version import LooseVersion + +from test import IntegrationTestCase, doxygen_version class Order(IntegrationTestCase): def __init__(self, *args, **kwargs): @@ -8,11 +12,24 @@ class Order(IntegrationTestCase): self.run_dox2html5(index_pages=['pages'], wildcard='index.xml') self.assertEqual(*self.actual_expected_contents('pages.html')) -class DuplicatedBrief(IntegrationTestCase): +class Brief(IntegrationTestCase): def __init__(self, *args, **kwargs): - super().__init__(__file__, 'duplicated_brief', *args, **kwargs) + super().__init__(__file__, 'brief', *args, **kwargs) + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/624") def test(self): - self.run_dox2html5(wildcard='page-*.xml') + self.run_dox2html5(wildcard='*.xml') + self.assertEqual(*self.actual_expected_contents('pages.html')) self.assertEqual(*self.actual_expected_contents('page-a.html')) self.assertEqual(*self.actual_expected_contents('page-b.html')) + +class Toc(IntegrationTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, 'toc', *args, **kwargs) + + @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.13"), + "https://github.com/doxygen/doxygen/pull/625") + def test(self): + self.run_dox2html5(wildcard='page-toc.xml') + self.assertEqual(*self.actual_expected_contents('page-toc.html')) -- 2.30.2