diff --git a/include/mrdocs/Metadata/Type.hpp b/include/mrdocs/Metadata/Type.hpp index 1d043e8c6a..7321b8f074 100644 --- a/include/mrdocs/Metadata/Type.hpp +++ b/include/mrdocs/Metadata/Type.hpp @@ -106,6 +106,18 @@ struct TypeInfo */ bool IsPackExpansion = false; + /** The constraints associated with the type + + This represents the constraints associated with the type, + such as SFINAE constraints. + + For instance, if SFINAE detection is enabled, the + expression `std::enable_if_t, T>` + will have type `T` (NamedType) and constraints + `{std::is_integral_v}`. + */ + std::vector Constraints; + constexpr virtual ~TypeInfo() = default; constexpr bool isNamed() const noexcept { return Kind == TypeKind::Named; } @@ -123,14 +135,17 @@ struct TypeInfo The inner type is the type which is modified by a specifier (e.g. "int" in "pointer to int". */ - virtual TypeInfo* innerType() const noexcept + virtual + TypeInfo* + innerType() const noexcept { return nullptr; } /** Return the symbol named by this type. */ - SymbolID namedSymbol() const noexcept; + SymbolID + namedSymbol() const noexcept; protected: constexpr diff --git a/src/lib/AST/ASTVisitor.cpp b/src/lib/AST/ASTVisitor.cpp index 79790f422d..05f3956be7 100644 --- a/src/lib/AST/ASTVisitor.cpp +++ b/src/lib/AST/ASTVisitor.cpp @@ -870,6 +870,30 @@ populate( { populate(I.Requires, TRC); } + else + { + // Iterate I.Params to find trailing requires clauses + for (auto it = I.Params.begin(); it != I.Params.end(); ) + { + if (it->Type && + !it->Type->Constraints.empty()) + { + for (ExprInfo const& constraint: it->Type->Constraints) + { + if (!I.Requires.Written.empty()) + { + I.Requires.Written += " && "; + } + I.Requires.Written += constraint.Written; + } + it = I.Params.erase(it); + } + else + { + ++it; + } + } + } populateAttributes(I, D); } @@ -1169,6 +1193,34 @@ populate( populate(Template.Args, CTSD->getTemplateArgs().asArray()); } + // Extract requires clause from SFINAE context + for (auto it = Template.Args.begin(); it != Template.Args.end();) + { + auto& arg = *it; + if (!arg) + { + ++it; + continue; + } + if (auto* T = dynamic_cast(arg.get()); + T && + T->Type && + !T->Type->Constraints.empty()) + { + for (ExprInfo const& constraint: T->Type->Constraints) + { + if (!Template.Requires.Written.empty()) + { + Template.Requires.Written += " && "; + } + Template.Requires.Written += constraint.Written; + } + it = Template.Args.erase(it); + continue; + } + ++it; + } + // Extract the template parameters if this is a partial specialization if (auto* CTPSD = dyn_cast(CTSD)) { @@ -1409,6 +1461,55 @@ populate( { populate(TI.Requires, RC); } + else + { + // If there's no requires clause, check if the template + // parameter types we extracted have constraints + for (auto it = TI.Params.begin(); it != TI.Params.end(); ) + { + std::unique_ptr& param = *it; + + if (auto const* T = dynamic_cast(param.get()); + T && + T->Type && + !T->Type->Constraints.empty()) + { + for (ExprInfo const& constraint: T->Type->Constraints) + { + if (!TI.Requires.Written.empty()) + { + TI.Requires.Written += " && "; + } + TI.Requires.Written += constraint.Written; + } + it = TI.Params.erase(it); + continue; + } + + if (param->Default && + param->Default->isType()) + { + if (auto const* T = dynamic_cast(param->Default.get()); + T && + T->Type && + !T->Type->Constraints.empty()) + { + for (ExprInfo const& constraint: T->Type->Constraints) + { + if (!TI.Requires.Written.empty()) + { + TI.Requires.Written += " && "; + } + TI.Requires.Written += constraint.Written; + } + it = TI.Params.erase(it); + continue; + } + } + + ++it; + } + } } void @@ -1884,25 +1985,32 @@ extractSFINAEInfo(QualType const T) // Find the parameter that represents the SFINAE result auto const Args = templateInfo->Arguments; MRDOCS_SYMBOL_TRACE(Args, context_); - auto const param_arg = tryGetTemplateArgument( + auto const resultType = tryGetTemplateArgument( SFINAEControl->Parameters, Args, SFINAEControl->ParamIdx); - MRDOCS_CHECK_OR(param_arg, std::nullopt); - MRDOCS_SYMBOL_TRACE(*param_arg, context_); + MRDOCS_CHECK_OR(resultType, std::nullopt); + MRDOCS_SYMBOL_TRACE(*resultType, context_); // Create a vector of template arguments that represent the // controlling parameters of the SFINAE template - std::vector ControllingArgs; + SFINAEInfo Result; + Result.Type = resultType->getAsType(); for (std::size_t I = 0; I < Args.size(); ++I) { if (SFINAEControl->ControllingParams[I]) { MRDOCS_SYMBOL_TRACE(Args[I], context_); - ControllingArgs.emplace_back(Args[I]); + Expr* E = Args[I].getAsExpr(); + if (!E) + { + continue; + } + Result.Constraints.emplace_back(); + populate(Result.Constraints.back(), E); } } // Return the main type and controlling types - return SFINAEInfo{param_arg->getAsType(), std::move(ControllingArgs)}; + return Result; } std::optional @@ -1963,16 +2071,16 @@ getSFINAEControlParams( // Find the index of the parameter that represents the SFINAE result // in the underlying template arguments - auto param_arg = tryGetTemplateArgument( + auto resultType = tryGetTemplateArgument( sfinaeControl->Parameters, underlyingTemplateInfo->Arguments, sfinaeControl->ParamIdx); - MRDOCS_CHECK_OR(param_arg, std::nullopt); - MRDOCS_SYMBOL_TRACE(*param_arg, context_); + MRDOCS_CHECK_OR(resultType, std::nullopt); + MRDOCS_SYMBOL_TRACE(*resultType, context_); // Find the index of the parameter that represents the SFINAE result // in the primary template arguments - unsigned ParamIdx = FindParam(ATD->getInjectedTemplateArgs(context_), *param_arg); + unsigned ParamIdx = FindParam(ATD->getInjectedTemplateArgs(context_), *resultType); // Return the controlling parameters with values corresponding to // the primary template arguments @@ -2060,11 +2168,11 @@ getSFINAEControlParams( } auto [template_params, controlling_params, param_idx] = *sfinae_result; - auto param_arg = tryGetTemplateArgument( + auto resultType = tryGetTemplateArgument( template_params, sfinae_info->Arguments, param_idx); - if(! param_arg) + if(! resultType) return true; - auto CurrentTypeFromBase = param_arg->getAsType(); + auto CurrentTypeFromBase = resultType->getAsType(); if (CurrentType.isNull()) { CurrentType = CurrentTypeFromBase; diff --git a/src/lib/AST/ASTVisitor.hpp b/src/lib/AST/ASTVisitor.hpp index eee76ca488..543af3e37f 100644 --- a/src/lib/AST/ASTVisitor.hpp +++ b/src/lib/AST/ASTVisitor.hpp @@ -734,7 +734,7 @@ class ASTVisitor QualType Type; // The template arguments used in the SFINAE context. - std::vector Arguments; + std::vector Constraints; }; /* Get the underlying type result of a SFINAE type diff --git a/src/lib/AST/TerminalTypeVisitor.hpp b/src/lib/AST/TerminalTypeVisitor.hpp index 9e52ea576c..eaba00ff25 100644 --- a/src/lib/AST/TerminalTypeVisitor.hpp +++ b/src/lib/AST/TerminalTypeVisitor.hpp @@ -87,6 +87,10 @@ class TerminalTypeVisitor // The optional NestedNameSpecifier. const NestedNameSpecifier* NNS_ = nullptr; +protected: + // Constraints associated with the type (e.g., SFINAE) + std::vector Constraints; + public: /** Constructor for TerminalTypeVisitor. @@ -571,6 +575,7 @@ class TerminalTypeVisitor if (auto SFINAE = getASTVisitor().extractSFINAEInfo(T)) { NNS_ = nullptr; + Constraints = SFINAE->Constraints; return getDerived().Visit(SFINAE->Type); } @@ -606,6 +611,7 @@ class TerminalTypeVisitor if (auto SFINAE = getASTVisitor().extractSFINAEInfo(T)) { NNS_ = nullptr; + Constraints = SFINAE->Constraints; return getDerived().Visit(SFINAE->Type); } diff --git a/src/lib/AST/TypeInfoBuilder.cpp b/src/lib/AST/TypeInfoBuilder.cpp index 459b88eef7..6fac4c334a 100644 --- a/src/lib/AST/TypeInfoBuilder.cpp +++ b/src/lib/AST/TypeInfoBuilder.cpp @@ -102,6 +102,7 @@ buildDecltype( getASTVisitor().populate( I->Operand, T->getUnderlyingExpr()); I->CVQualifiers = toQualifierKind(quals); + I->Constraints = this->Constraints; *Inner = std::move(I); Result->IsPackExpansion = pack; } @@ -129,6 +130,7 @@ buildAuto( // Constraint->Prefix = getASTVisitor().buildNameInfo( // cast(CD->getDeclContext())); } + I->Constraints = this->Constraints; *Inner = std::move(I); Result->IsPackExpansion = pack; } @@ -145,12 +147,12 @@ buildTerminal( { auto TI = std::make_unique(); TI->CVQualifiers = toQualifierKind(quals); - - auto Name = std::make_unique(); - Name->Name = getASTVisitor().toString(T); - Name->Prefix = getASTVisitor().toNameInfo(NNS); - TI->Name = std::move(Name); + TI->Name = std::make_unique(); + TI->Name->Name = getASTVisitor().toString(T); + TI->Name->Prefix = getASTVisitor().toNameInfo(NNS); + TI->Constraints = this->Constraints; *Inner = std::move(TI); + Result->Constraints = this->Constraints; Result->IsPackExpansion = pack; } @@ -187,7 +189,9 @@ buildTerminal( Name->Prefix = getASTVisitor().toNameInfo(NNS); I->Name = std::move(Name); } + I->Constraints = this->Constraints; *Inner = std::move(I); + Result->Constraints = this->Constraints; Result->IsPackExpansion = pack; } @@ -240,7 +244,9 @@ buildTerminal( getASTVisitor().populate(Name->TemplateArgs, *TArgs); TI->Name = std::move(Name); } + TI->Constraints = this->Constraints; *Inner = std::move(TI); + Result->Constraints = this->Constraints; Result->IsPackExpansion = pack; } diff --git a/src/lib/Metadata/Type.cpp b/src/lib/Metadata/Type.cpp index 166cccf39d..1158d5f5f4 100644 --- a/src/lib/Metadata/Type.cpp +++ b/src/lib/Metadata/Type.cpp @@ -83,12 +83,15 @@ SymbolID TypeInfo:: namedSymbol() const noexcept { - if(! isNamed()) + if (!isNamed()) + { return SymbolID::invalid; - const auto* NT = static_cast< - const NamedTypeInfo*>(this); - if(! NT->Name) + } + auto const* NT = static_cast(this); + if (!NT->Name) + { return SymbolID::invalid; + } return NT->Name->id; } diff --git a/test-files/adoc/compile_commands.json b/test-files/adoc/compile_commands.json deleted file mode 100644 index a7b785ffc4..0000000000 --- a/test-files/adoc/compile_commands.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "directory": ".", - "command": "clang test.cpp", - "file": "test.cpp" - } -] diff --git a/test-files/adoc/mrdocs.yml b/test-files/adoc/mrdocs.yml deleted file mode 100644 index 1bd325dbf1..0000000000 --- a/test-files/adoc/mrdocs.yml +++ /dev/null @@ -1,13 +0,0 @@ -#ignore-failures: true -extract: - inaccessible-members: never -concurrency: 1 -source-root: . -single-page: true -input: - include: - #- test.cpp -defines: - #- BOOST_URL_DOCS -generator: - adoc: diff --git a/test-files/adoc/test.cpp b/test-files/adoc/test.cpp deleted file mode 100644 index 7c614f4956..0000000000 --- a/test-files/adoc/test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/** The type of string_view used by the library - - String views are used to pass character - buffers into or out of functions. Ownership - of the underlying character buffer is not - transferred; the caller is responsible for - ensuring that the lifetime of character - buffer extends until it is no longer - referenced. - - @note This alias is no longer supported and - should not be used in new code. Please use - `core::string_view` instead. - - This alias is included for backwards - compatibility with earlier versions of the - library. - - However, it will be removed in future releases, - and using it in new code is not recommended. - - Please use the updated version instead to - ensure compatibility with future versions of - the library. - -*/ -struct string_view{}; diff --git a/test-files/adoc/test.xml b/test-files/adoc/test.xml deleted file mode 100644 index 29456a5208..0000000000 --- a/test-files/adoc/test.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - The type of string_view used by the library - - - String views are used to pass character - buffers into or out of functions. Ownership - of the underlying character buffer is not - transferred; the caller is responsible for - ensuring that the lifetime of character - buffer extends until it is no longer - referenced. - - - - - - This alias is no longer supported and - should not be used in new code. Please use - `core::string_view` instead. - - - This alias is included for backwards - compatibility with earlier versions of the - library. - - - However, it will be removed in future releases, - and using it in new code is not recommended. - - - Please use the updated version instead to - ensure compatibility with future versions of - the library. - - - - - diff --git a/test-files/golden-tests/javadoc/brief-4.adoc b/test-files/golden-tests/javadoc/brief-4.adoc new file mode 100644 index 0000000000..48c79c0d86 --- /dev/null +++ b/test-files/golden-tests/javadoc/brief-4.adoc @@ -0,0 +1,82 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=1] +|=== +| Name + +| <> +| <> +| <> +| <> +|=== + +[#f0] +== f0 + + +=== Synopsis + + +Declared in `<brief‐4.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f0(); +---- + +[#f1] +== f1 + + +=== Synopsis + + +Declared in `<brief‐4.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f1(); +---- + +[#f2] +== f2 + + +=== Synopsis + + +Declared in `<brief‐4.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f2(); +---- + +[#f3] +== f3 + + +=== Synopsis + + +Declared in `<brief‐4.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f3(); +---- + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/brief-1.cpp b/test-files/golden-tests/javadoc/brief-4.cpp similarity index 100% rename from test-files/javadoc/brief-1.cpp rename to test-files/golden-tests/javadoc/brief-4.cpp diff --git a/test-files/golden-tests/javadoc/brief-4.html b/test-files/golden-tests/javadoc/brief-4.html new file mode 100644 index 0000000000..165d1bee9d --- /dev/null +++ b/test-files/golden-tests/javadoc/brief-4.html @@ -0,0 +1,98 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + + + + +
Name
f0
f1
f2
f3
+
+
+
+

f0

+
+
+

Synopsis

+
+Declared in <brief-4.cpp>
+
+
+void
+f0();
+
+
+
+
+
+
+

f1

+
+
+

Synopsis

+
+Declared in <brief-4.cpp>
+
+
+void
+f1();
+
+
+
+
+
+
+

f2

+
+
+

Synopsis

+
+Declared in <brief-4.cpp>
+
+
+void
+f2();
+
+
+
+
+
+
+

f3

+
+
+

Synopsis

+
+Declared in <brief-4.cpp>
+
+
+void
+f3();
+
+
+
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/javadoc/brief-1.xml b/test-files/golden-tests/javadoc/brief-4.xml similarity index 60% rename from test-files/javadoc/brief-1.xml rename to test-files/golden-tests/javadoc/brief-4.xml index c37d45bb63..4c00577699 100644 --- a/test-files/javadoc/brief-1.xml +++ b/test-files/golden-tests/javadoc/brief-4.xml @@ -1,18 +1,18 @@ - + - + - + - + - + diff --git a/test-files/golden-tests/javadoc/brief-5.adoc b/test-files/golden-tests/javadoc/brief-5.adoc new file mode 100644 index 0000000000..afc36fa370 --- /dev/null +++ b/test-files/golden-tests/javadoc/brief-5.adoc @@ -0,0 +1,134 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| brief + +| <> +| + +| <> +| + +| <> +| brief + +| <> +| brief + +| <> +| brief + +|=== + +[#f0] +== f0 + + +brief + +=== Synopsis + + +Declared in `<brief‐5.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f0(); +---- + +[#f1] +== f1 + + +=== Synopsis + + +Declared in `<brief‐5.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f1(); +---- + +[#f2] +== f2 + + +=== Synopsis + + +Declared in `<brief‐5.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f2(); +---- + +[#f3] +== f3 + + +brief + +=== Synopsis + + +Declared in `<brief‐5.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f3(); +---- + +[#f4] +== f4 + + +brief + +=== Synopsis + + +Declared in `<brief‐5.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f4(); +---- + +[#f5] +== f5 + + +brief + +=== Synopsis + + +Declared in `<brief‐5.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f5(); +---- + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/brief-2.cpp b/test-files/golden-tests/javadoc/brief-5.cpp similarity index 100% rename from test-files/javadoc/brief-2.cpp rename to test-files/golden-tests/javadoc/brief-5.cpp diff --git a/test-files/golden-tests/javadoc/brief-5.html b/test-files/golden-tests/javadoc/brief-5.html new file mode 100644 index 0000000000..5c92ec0432 --- /dev/null +++ b/test-files/golden-tests/javadoc/brief-5.html @@ -0,0 +1,162 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + + + + + + +
NameDescription
f0 brief + +
f1 +
f2 +
f3 brief + +
f4 brief + +
f5 brief + +
+
+
+
+

f0

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <brief-5.cpp>
+
+
+void
+f0();
+
+
+
+
+
+
+

f1

+
+
+

Synopsis

+
+Declared in <brief-5.cpp>
+
+
+void
+f1();
+
+
+
+
+
+
+

f2

+
+
+

Synopsis

+
+Declared in <brief-5.cpp>
+
+
+void
+f2();
+
+
+
+
+
+
+

f3

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <brief-5.cpp>
+
+
+void
+f3();
+
+
+
+
+
+
+

f4

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <brief-5.cpp>
+
+
+void
+f4();
+
+
+
+
+
+
+

f5

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <brief-5.cpp>
+
+
+void
+f5();
+
+
+
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/javadoc/brief-2.xml b/test-files/golden-tests/javadoc/brief-5.xml similarity index 68% rename from test-files/javadoc/brief-2.xml rename to test-files/golden-tests/javadoc/brief-5.xml index 3a9b2c13cf..cb5a314530 100644 --- a/test-files/javadoc/brief-2.xml +++ b/test-files/golden-tests/javadoc/brief-5.xml @@ -1,9 +1,9 @@ - + - + brief @@ -11,21 +11,21 @@ - + - + - + brief @@ -33,7 +33,7 @@ - + brief @@ -41,7 +41,7 @@ - + brief diff --git a/test-files/golden-tests/javadoc/brief-6.adoc b/test-files/golden-tests/javadoc/brief-6.adoc new file mode 100644 index 0000000000..e3680abb7e --- /dev/null +++ b/test-files/golden-tests/javadoc/brief-6.adoc @@ -0,0 +1,45 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| brief + +|=== + +[#f0] +== f0 + + +brief + +=== Synopsis + + +Declared in `<brief‐6.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f0(); +---- + +=== Description + + +desc + + + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/brief-3.cpp b/test-files/golden-tests/javadoc/brief-6.cpp similarity index 100% rename from test-files/javadoc/brief-3.cpp rename to test-files/golden-tests/javadoc/brief-6.cpp diff --git a/test-files/golden-tests/javadoc/brief-6.html b/test-files/golden-tests/javadoc/brief-6.html new file mode 100644 index 0000000000..5676651ac2 --- /dev/null +++ b/test-files/golden-tests/javadoc/brief-6.html @@ -0,0 +1,60 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + +
NameDescription
f0 brief + +
+
+
+
+

f0

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <brief-6.cpp>
+
+
+void
+f0();
+
+
+
+
+

Description

+

desc

+ + +
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/javadoc/brief-3.xml b/test-files/golden-tests/javadoc/brief-6.xml similarity index 78% rename from test-files/javadoc/brief-3.xml rename to test-files/golden-tests/javadoc/brief-6.xml index c4ea330bc1..f9b13d634d 100644 --- a/test-files/javadoc/brief-3.xml +++ b/test-files/golden-tests/javadoc/brief-6.xml @@ -1,9 +1,9 @@ - + - + desc diff --git a/test-files/golden-tests/javadoc/copydoc.adoc b/test-files/golden-tests/javadoc/copydoc.adoc new file mode 100644 index 0000000000..b6694d4780 --- /dev/null +++ b/test-files/golden-tests/javadoc/copydoc.adoc @@ -0,0 +1,92 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| brief1 + +| <> +| brief1 + +| <> +| brief1 + +|=== + +[#f1] +== f1 + + +brief1 + +=== Synopsis + + +Declared in `<copydoc.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f1(); +---- + +[#f2] +== f2 + + +brief1 + +=== Synopsis + + +Declared in `<copydoc.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f2(); +---- + +=== Description + + +xref:#f1[f1] + + + +[#f3] +== f3 + + +brief1 + +=== Synopsis + + +Declared in `<copydoc.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f3(); +---- + +=== Description + + +xref:#f1[f1] f2 + + + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/copydoc.cpp b/test-files/golden-tests/javadoc/copydoc.cpp similarity index 100% rename from test-files/javadoc/copydoc.cpp rename to test-files/golden-tests/javadoc/copydoc.cpp diff --git a/test-files/golden-tests/javadoc/copydoc.html b/test-files/golden-tests/javadoc/copydoc.html new file mode 100644 index 0000000000..1278ae7abc --- /dev/null +++ b/test-files/golden-tests/javadoc/copydoc.html @@ -0,0 +1,114 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + + + +
NameDescription
f1 brief1 + +
f2 brief1 + +
f3 brief1 + +
+
+
+
+

f1

+
+brief1 + + +
+
+
+

Synopsis

+
+Declared in <copydoc.cpp>
+
+
+void
+f1();
+
+
+
+
+
+
+

f2

+
+brief1 + + +
+
+
+

Synopsis

+
+Declared in <copydoc.cpp>
+
+
+void
+f2();
+
+
+
+
+

Description

+

f1

+ + +
+
+
+
+

f3

+
+brief1 + + +
+
+
+

Synopsis

+
+Declared in <copydoc.cpp>
+
+
+void
+f3();
+
+
+
+
+

Description

+

f1 f2

+ + +
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/javadoc/copydoc.xml b/test-files/golden-tests/javadoc/copydoc.xml similarity index 54% rename from test-files/javadoc/copydoc.xml rename to test-files/golden-tests/javadoc/copydoc.xml index 27b364d45f..460f77ca93 100644 --- a/test-files/javadoc/copydoc.xml +++ b/test-files/golden-tests/javadoc/copydoc.xml @@ -1,9 +1,9 @@ - + - + brief1 @@ -11,13 +11,19 @@ - + + + + f1 + + - + - f2 + f1 + f2 diff --git a/test-files/golden-tests/javadoc/listitem.adoc b/test-files/golden-tests/javadoc/listitem.adoc new file mode 100644 index 0000000000..9d332c408b --- /dev/null +++ b/test-files/golden-tests/javadoc/listitem.adoc @@ -0,0 +1,126 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| + +| <> +| + +| <> +| brief + +| <> +| brief + +|=== + +[#f0] +== f0 + + +=== Synopsis + + +Declared in `<listitem.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f0(); +---- + +=== Description + + +* item + + + +[#f1] +== f1 + + +=== Synopsis + + +Declared in `<listitem.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f1(); +---- + +=== Description + + +* item 1 +* item 2 + + + +[#f2] +== f2 + + +brief + +=== Synopsis + + +Declared in `<listitem.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f2(); +---- + +=== Description + + +* item 1 +* item 2 + + + +[#f3] +== f3 + + +brief + +=== Synopsis + + +Declared in `<listitem.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f3(); +---- + +=== Description + + +* item 1 +* item 2 +* item 3 + + + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/listitem.cpp b/test-files/golden-tests/javadoc/listitem.cpp similarity index 100% rename from test-files/javadoc/listitem.cpp rename to test-files/golden-tests/javadoc/listitem.cpp diff --git a/test-files/golden-tests/javadoc/listitem.html b/test-files/golden-tests/javadoc/listitem.html new file mode 100644 index 0000000000..5286571e0e --- /dev/null +++ b/test-files/golden-tests/javadoc/listitem.html @@ -0,0 +1,150 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + + + + +
NameDescription
f0 +
f1 +
f2 brief + +
f3 brief + +
+
+
+
+

f0

+
+
+

Synopsis

+
+Declared in <listitem.cpp>
+
+
+void
+f0();
+
+
+
+
+

Description

+
    +
  • item
  • +
+ + +
+
+
+
+

f1

+
+
+

Synopsis

+
+Declared in <listitem.cpp>
+
+
+void
+f1();
+
+
+
+
+

Description

+
    +
  • item 1
  • +
  • item 2
  • +
+ + +
+
+
+
+

f2

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <listitem.cpp>
+
+
+void
+f2();
+
+
+
+
+

Description

+
    +
  • item 1
  • +
  • item 2
  • +
+ + +
+
+
+
+

f3

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <listitem.cpp>
+
+
+void
+f3();
+
+
+
+
+

Description

+
    +
  • item 1
  • +
  • item 2
  • +
  • item 3
  • +
+ + +
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/golden-tests/javadoc/listitem.xml b/test-files/golden-tests/javadoc/listitem.xml new file mode 100644 index 0000000000..6859aa490f --- /dev/null +++ b/test-files/golden-tests/javadoc/listitem.xml @@ -0,0 +1,64 @@ + + + + + + + + + item + + + + + + + + + + item 1 + + + item 2 + + + + + + + + + brief + + + + item 1 + + + item 2 + + + + + + + + + brief + + + + item 1 + + + item 2 + + + item 3 + + + + + + diff --git a/test-files/golden-tests/javadoc/param-1.adoc b/test-files/golden-tests/javadoc/param-1.adoc new file mode 100644 index 0000000000..9f3b82a4ed --- /dev/null +++ b/test-files/golden-tests/javadoc/param-1.adoc @@ -0,0 +1,170 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| + +| <> +| + +| <> +| + +| <> +| + +| <> +| + +|=== + +[#f0] +== f0 + + +=== Synopsis + + +Declared in `<param‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f0(int i); +---- + +=== Parameters + + +|=== +| Name | Description + +| *i* +| int + + +|=== + +[#f1] +== f1 + + +=== Synopsis + + +Declared in `<param‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f1(int i); +---- + +=== Parameters + + +|=== +| Name | Description + +| *i* [in] +| int + + +|=== + +[#f2] +== f2 + + +=== Synopsis + + +Declared in `<param‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f2(int& i); +---- + +=== Parameters + + +|=== +| Name | Description + +| *i* [out] +| int + + +|=== + +[#f3] +== f3 + + +=== Synopsis + + +Declared in `<param‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f3(int& i); +---- + +=== Parameters + + +|=== +| Name | Description + +| *i* [inout] +| int + + +|=== + +[#f4] +== f4 + + +=== Synopsis + + +Declared in `<param‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +void +f4( + int i, + double j); +---- + +=== Parameters + + +|=== +| Name | Description + +| *i,j* +| numbers + + +|=== + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/param-1.cpp b/test-files/golden-tests/javadoc/param-1.cpp similarity index 100% rename from test-files/javadoc/param-1.cpp rename to test-files/golden-tests/javadoc/param-1.cpp diff --git a/test-files/golden-tests/javadoc/param-1.html b/test-files/golden-tests/javadoc/param-1.html new file mode 100644 index 0000000000..cd69602d2d --- /dev/null +++ b/test-files/golden-tests/javadoc/param-1.html @@ -0,0 +1,212 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + + + + + +
NameDescription
f0 +
f1 +
f2 +
f3 +
f4 +
+
+
+
+

f0

+
+
+

Synopsis

+
+Declared in <param-1.cpp>
+
+
+void
+f0(int i);
+
+
+
+
+

Parameters

+ + + + + + + + + + + + + +
NameDescription
i

int

+
+
+
+
+
+

f1

+
+
+

Synopsis

+
+Declared in <param-1.cpp>
+
+
+void
+f1(int i);
+
+
+
+
+

Parameters

+ + + + + + + + + + + + + +
NameDescription
i [in]

int

+
+
+
+
+
+

f2

+
+
+

Synopsis

+
+Declared in <param-1.cpp>
+
+
+void
+f2(int& i);
+
+
+
+
+

Parameters

+ + + + + + + + + + + + + +
NameDescription
i [out]

int

+
+
+
+
+
+

f3

+
+
+

Synopsis

+
+Declared in <param-1.cpp>
+
+
+void
+f3(int& i);
+
+
+
+
+

Parameters

+ + + + + + + + + + + + + +
NameDescription
i [inout]

int

+
+
+
+
+
+

f4

+
+
+

Synopsis

+
+Declared in <param-1.cpp>
+
+
+void
+f4(
+    int i,
+    double j);
+
+
+
+
+

Parameters

+ + + + + + + + + + + + + +
NameDescription
i,j

numbers

+
+
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/javadoc/param-1.xml b/test-files/golden-tests/javadoc/param-1.xml similarity index 78% rename from test-files/javadoc/param-1.xml rename to test-files/golden-tests/javadoc/param-1.xml index afe3864126..aa73ab91e8 100644 --- a/test-files/javadoc/param-1.xml +++ b/test-files/golden-tests/javadoc/param-1.xml @@ -1,9 +1,9 @@ - + - + @@ -14,7 +14,7 @@
- + @@ -25,7 +25,7 @@
- + @@ -38,7 +38,7 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/test-files/golden-tests/javadoc/tparam-1.adoc b/test-files/golden-tests/javadoc/tparam-1.adoc new file mode 100644 index 0000000000..fecc4ba7a8 --- /dev/null +++ b/test-files/golden-tests/javadoc/tparam-1.adoc @@ -0,0 +1,91 @@ += Reference +:mrdocs: + +[#index] +== Global namespace + + +=== Functions + +[cols=2] +|=== +| Name | Description + +| <> +| + +| <> +| brief + +|=== + +[#f0] +== f0 + + +=== Synopsis + + +Declared in `<tparam‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +template<class T> +void +f0(); +---- + +=== Template Parameters + + +|=== +| Name | Description + +| *T* +| +|=== + +[#f1] +== f1 + + +brief + +=== Synopsis + + +Declared in `<tparam‐1.cpp>` + +[source,cpp,subs="verbatim,replacements,macros,-callouts"] +---- +template<class T> +void +f1(); +---- + +=== Description + + +desc + + + +=== Template Parameters + + +|=== +| Name | Description + +| *T* +| type + + +| *T* +| type + + +|=== + + + +[.small]#Created with https://www.mrdocs.com[MrDocs]# diff --git a/test-files/javadoc/tparam-1.cpp b/test-files/golden-tests/javadoc/tparam-1.cpp similarity index 100% rename from test-files/javadoc/tparam-1.cpp rename to test-files/golden-tests/javadoc/tparam-1.cpp diff --git a/test-files/golden-tests/javadoc/tparam-1.html b/test-files/golden-tests/javadoc/tparam-1.html new file mode 100644 index 0000000000..b3ca4db305 --- /dev/null +++ b/test-files/golden-tests/javadoc/tparam-1.html @@ -0,0 +1,120 @@ + + +Reference + + +
+

Reference

+
+
+

Global namespace

+
+

Functions

+ + + + + + + + + + + +
NameDescription
f0 +
f1 brief + +
+
+
+
+

f0

+
+
+

Synopsis

+
+Declared in <tparam-1.cpp>
+
+
+template<class T>
+void
+f0();
+
+
+
+
+

Template Parameters

+ + + + + + + + + + + + + +
NameDescription
T
+
+
+
+
+

f1

+
+brief + + +
+
+
+

Synopsis

+
+Declared in <tparam-1.cpp>
+
+
+template<class T>
+void
+f1();
+
+
+
+
+

Description

+

desc

+ + +
+
+

Template Parameters

+ + + + + + + + + + + + + + + + + +
NameDescription
T

type

+
T

type

+
+
+
+ +
+
+

Created with MrDocs

+
+ + \ No newline at end of file diff --git a/test-files/javadoc/tparam-1.xml b/test-files/golden-tests/javadoc/tparam-1.xml similarity index 75% rename from test-files/javadoc/tparam-1.xml rename to test-files/golden-tests/javadoc/tparam-1.xml index 1b8aec9bd2..44099e4592 100644 --- a/test-files/javadoc/tparam-1.xml +++ b/test-files/golden-tests/javadoc/tparam-1.xml @@ -1,11 +1,11 @@ - +