Don't indent Doxygen doc strings in generated Python code.
This is unnecessary and inconsistent with "builtin" case in which the docstrings are not indented in the generated C++ code, thus making it impossible to write tests working in both cases. Most of the changes in this commit simply remove the extra whitespace from the expected values in the tests.
This commit is contained in:
parent
9b857e6cf1
commit
410b508e9a
9 changed files with 471 additions and 535 deletions
|
|
@ -7,75 +7,68 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_basic_notranslate.function.__doc__,
|
||||
r"""
|
||||
\brief
|
||||
Brief description.
|
||||
|
||||
The comment text
|
||||
\author Some author
|
||||
\return Some number
|
||||
\sa function2
|
||||
|
||||
"""
|
||||
\brief
|
||||
Brief description.
|
||||
|
||||
The comment text
|
||||
\author Some author
|
||||
\return Some number
|
||||
\sa function2
|
||||
"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_basic_notranslate.function2.__doc__,
|
||||
r"""
|
||||
A test of a very very very very very very very very very very very very very very very very
|
||||
very very very very very long comment string.
|
||||
|
||||
"""
|
||||
A test of a very very very very very very very very very very very very very very very very
|
||||
very very very very very long comment string.
|
||||
"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_basic_notranslate.function3.__doc__,
|
||||
r"""
|
||||
*Overload 1:*
|
||||
r""" *Overload 1:*
|
||||
|
||||
A test for overloaded functions
|
||||
This is function \b one
|
||||
A test for overloaded functions
|
||||
This is function \b one
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
*Overload 2:*
|
||||
|
||||
A test for overloaded functions
|
||||
This is function \b two
|
||||
"""
|
||||
A test for overloaded functions
|
||||
This is function \b two"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_basic_notranslate.function4.__doc__,
|
||||
r"""
|
||||
A test of some mixed tag usage
|
||||
\if CONDITION
|
||||
This \a code fragment shows us something \.
|
||||
\par Minuses:
|
||||
\arg it's senseless
|
||||
\arg it's stupid
|
||||
\arg it's null
|
||||
A test of some mixed tag usage
|
||||
\if CONDITION
|
||||
This \a code fragment shows us something \.
|
||||
\par Minuses:
|
||||
\arg it's senseless
|
||||
\arg it's stupid
|
||||
\arg it's null
|
||||
|
||||
\warning This may not work as expected
|
||||
\warning This may not work as expected
|
||||
|
||||
\code
|
||||
int main() { while(true); }
|
||||
\endcode
|
||||
\endif
|
||||
|
||||
"""
|
||||
\code
|
||||
int main() { while(true); }
|
||||
\endcode
|
||||
\endif
|
||||
"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_notranslate.function5.__doc__,
|
||||
r""" This is a post comment. """
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_notranslate.function6.__doc__,
|
||||
r"""
|
||||
Test for default args
|
||||
@param a Some parameter, default is 42
|
||||
|
||||
"""
|
||||
Test for default args
|
||||
@param a Some parameter, default is 42
|
||||
"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_notranslate.function7.__doc__,
|
||||
r"""
|
||||
Test for a parameter with difficult type
|
||||
(mostly for python)
|
||||
@param a Very strange param
|
||||
|
||||
"""
|
||||
Test for a parameter with difficult type
|
||||
(mostly for python)
|
||||
@param a Very strange param
|
||||
"""
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,80 +7,74 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_basic_translate.function.__doc__,
|
||||
"""
|
||||
Brief description.
|
||||
|
||||
The comment text.
|
||||
Brief description.
|
||||
|
||||
Author: Some author
|
||||
The comment text.
|
||||
|
||||
:rtype: int
|
||||
:return: Some number
|
||||
Author: Some author
|
||||
|
||||
See also: function2
|
||||
"""
|
||||
:rtype: int
|
||||
:return: Some number
|
||||
|
||||
See also: function2"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function2.__doc__,
|
||||
"""
|
||||
A test of a very very very very very very very very very very very very very very very very
|
||||
very very very very very long comment string.
|
||||
"""
|
||||
A test of a very very very very very very very very very very very very very very very very
|
||||
very very very very very long comment string."""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function3.__doc__,
|
||||
"""
|
||||
*Overload 1:*
|
||||
"""*Overload 1:*
|
||||
|
||||
A test for overloaded functions
|
||||
This is function **one**
|
||||
A test for overloaded functions
|
||||
This is function **one**
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
*Overload 2:*
|
||||
|
||||
A test for overloaded functions
|
||||
This is function **two**
|
||||
"""
|
||||
A test for overloaded functions
|
||||
This is function **two**"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function4.__doc__,
|
||||
"""
|
||||
A test of some mixed tag usage
|
||||
If: CONDITION {
|
||||
This *code* fragment shows us something .
|
||||
Title: Minuses:
|
||||
* it\'s senseless
|
||||
* it\'s stupid
|
||||
* it\'s null
|
||||
A test of some mixed tag usage
|
||||
If: CONDITION {
|
||||
This *code* fragment shows us something .
|
||||
Title: Minuses:
|
||||
* it\'s senseless
|
||||
* it\'s stupid
|
||||
* it\'s null
|
||||
|
||||
Warning: This may not work as expected
|
||||
Warning: This may not work as expected
|
||||
|
||||
.. code-block:: c++
|
||||
.. code-block:: c++
|
||||
|
||||
|
||||
int main() { while(true); }
|
||||
int main() { while(true); }
|
||||
|
||||
}
|
||||
"""
|
||||
}"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function5.__doc__,
|
||||
""" This is a post comment."""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function6.__doc__,
|
||||
"""
|
||||
Test for default args
|
||||
:type a: int
|
||||
:param a: Some parameter, default is 42
|
||||
"""
|
||||
Test for default args
|
||||
:type a: int
|
||||
:param a: Some parameter, default is 42"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function7.__doc__,
|
||||
"""
|
||||
Test for a parameter with difficult type
|
||||
(mostly for python)
|
||||
:type a: :py:class:`Shape`
|
||||
:param a: Very strange param
|
||||
"""
|
||||
Test for a parameter with difficult type
|
||||
(mostly for python)
|
||||
:type a: :py:class:`Shape`
|
||||
:param a: Very strange param"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_basic_translate.Atan2.__doc__,
|
||||
"""
|
||||
"""
|
||||
Multiple parameters test.
|
||||
|
||||
:type y: float
|
||||
|
|
@ -88,6 +82,5 @@ commentVerifier.check(doxygen_basic_translate.Atan2.__doc__,
|
|||
:type x: float
|
||||
:param x: Horizontal coordinate.
|
||||
:rtype: float
|
||||
:return: Arc tangent of ``y/x``.
|
||||
"""
|
||||
:return: Arc tangent of ``y/x``."""
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,15 +7,14 @@ commentVerifier.check(doxygen_ignore.func.__doc__,
|
|||
r"""
|
||||
A contrived example of ignoring too many commands in one comment.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This is specific to **Python**.
|
||||
|
||||
|
||||
Command ignored, but anything here is still included.
|
||||
|
||||
|
||||
""")
|
||||
|
|
|
|||
|
|
@ -8,49 +8,46 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.getAddress.__doc__,
|
||||
r"""
|
||||
Returns address of file line.
|
||||
Returns address of file line.
|
||||
|
||||
:type fileName: int
|
||||
:param fileName: name of the file, where the source line is located
|
||||
:type line: int
|
||||
:param line: line number
|
||||
:type isGetSize: boolean
|
||||
:param isGetSize: if set, for every object location both address and size are returned
|
||||
:type fileName: int
|
||||
:param fileName: name of the file, where the source line is located
|
||||
:type line: int
|
||||
:param line: line number
|
||||
:type isGetSize: boolean
|
||||
:param isGetSize: if set, for every object location both address and size are returned
|
||||
|
||||
Connection::getId()
|
||||
|
||||
""")
|
||||
Connection::getId()
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
|
||||
r"""
|
||||
This class contains information for connection to winIDEA. Its methods
|
||||
return reference to self, so we can use it like this:
|
||||
This class contains information for connection to winIDEA. Its methods
|
||||
return reference to self, so we can use it like this:
|
||||
|
||||
CConnectionConfig config = new CConnectionConfig();
|
||||
config.discoveryPort(5534).dllPath("C:\\myWinIDEA\\connect.dll").id("main");
|
||||
CConnectionConfig config = new CConnectionConfig();
|
||||
config.discoveryPort(5534).dllPath("C:\\myWinIDEA\\connect.dll").id("main");
|
||||
|
||||
|
||||
All parameters are optional. Set only what is required, default values are
|
||||
used for unspecified parameters.
|
||||
All parameters are optional. Set only what is required, default values are
|
||||
used for unspecified parameters.
|
||||
|
||||
|
||||
|
||||
advancedWinIDEALaunching.py Python example.
|
||||
|
||||
""")
|
||||
advancedWinIDEALaunching.py Python example.
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.waitTime.__doc__,
|
||||
r"""
|
||||
Determines how long the ``isystem.connect`` should wait for running
|
||||
instances to respond. Only one of ``lfWaitXXX`` flags from IConnect::ELaunchFlags
|
||||
may be specified.
|
||||
"""
|
||||
Determines how long the ``isystem.connect`` should wait for running
|
||||
instances to respond. Only one of ``lfWaitXXX`` flags from IConnect::ELaunchFlags
|
||||
may be specified."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.getConnection.__doc__,
|
||||
r"""
|
||||
This function returns connection id.
|
||||
"""
|
||||
r"""
|
||||
|
||||
This function returns connection id."""
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -60,37 +57,31 @@ commentVerifier.check(doxygen_misc_constructs.getFirstLetter.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.ClassWithNestedEnum.__doc__,
|
||||
r"""
|
||||
Class description.
|
||||
"""
|
||||
Class description."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.showList.__doc__,
|
||||
r"""
|
||||
An example of a list in a documentation comment.
|
||||
An example of a list in a documentation comment.
|
||||
|
||||
- The first item of the list.
|
||||
- The second list item, on
|
||||
several indented lines,
|
||||
showing that the indentation
|
||||
is preserved.
|
||||
- And the final list item after it.
|
||||
- The first item of the list.
|
||||
- The second list item, on
|
||||
several indented lines,
|
||||
showing that the indentation
|
||||
is preserved.
|
||||
- And the final list item after it.
|
||||
|
||||
And this is not a list item any more.
|
||||
"""
|
||||
And this is not a list item any more."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidA.__doc__,
|
||||
r"""
|
||||
This comment without space after '*' is valid in Doxygen.
|
||||
|
||||
"""
|
||||
r"""This comment without space after '*' is valid in Doxygen.
|
||||
"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidB.__doc__,
|
||||
r"""
|
||||
.This comment without space after '*' is valid in Doxygen.
|
||||
|
||||
"""
|
||||
r""".This comment without space after '*' is valid in Doxygen.
|
||||
"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidC.__doc__,
|
||||
|
|
@ -99,64 +90,60 @@ commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidC.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashA.__doc__,
|
||||
r"""
|
||||
Backslash following``word`` is a valid doxygen command. Output contains
|
||||
'followingword' with 'word' in code font.
|
||||
"""
|
||||
Backslash following``word`` is a valid doxygen command. Output contains
|
||||
'followingword' with 'word' in code font."""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashB.__doc__,
|
||||
r"""
|
||||
Doxy command without trailing space is ignored - nothing appears
|
||||
on output. Standalone \ and '\' get to output.
|
||||
Standalone @ and '@' get to output.
|
||||
Commands "in quoted \b strings are treated as plain text".
|
||||
Commands not recognized by Doxygen are ignored.
|
||||
Backslashes in DOS paths d:and words
|
||||
following them do not appear on output, we must quote them with
|
||||
double quotes: "d:\xyz\qwe\myfile", "@something". Single quotes do not help:
|
||||
'd:'. Escaping works: d:\xyz\qwe\myfile. Unix
|
||||
paths of course have no such problems: /xyz/qwe/myfile
|
||||
Commands for escaped symbols:
|
||||
$ @ \ & ~ < > # % " . :: @text ::text
|
||||
"""
|
||||
Doxy command without trailing space is ignored - nothing appears
|
||||
on output. Standalone \ and '\' get to output.
|
||||
Standalone @ and '@' get to output.
|
||||
Commands "in quoted \b strings are treated as plain text".
|
||||
Commands not recognized by Doxygen are ignored.
|
||||
Backslashes in DOS paths d:and words
|
||||
following them do not appear on output, we must quote them with
|
||||
double quotes: "d:\xyz\qwe\myfile", "@something". Single quotes do not help:
|
||||
'd:'. Escaping works: d:\xyz\qwe\myfile. Unix
|
||||
paths of course have no such problems: /xyz/qwe/myfile
|
||||
Commands for escaped symbols:
|
||||
$ @ \ & ~ < > # % " . :: @text ::text"""
|
||||
)
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashC.__doc__,
|
||||
r"""
|
||||
Backslash e at end of *line* froze SWIG
|
||||
*with* old comment parser.
|
||||
Backslash e at end of *line* froze SWIG
|
||||
*with* old comment parser.
|
||||
|
||||
See also: MyClass::fun(char,
|
||||
float)
|
||||
"""
|
||||
See also: MyClass::fun(char,
|
||||
float)"""
|
||||
)
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_misc_constructs.cycle.__doc__,
|
||||
r"""
|
||||
The next line contains expression:
|
||||
The next line contains expression:
|
||||
|
||||
['retVal < 10', 'g_counter == 23 && g_mode & 3']
|
||||
['retVal < 10', 'g_counter == 23 && g_mode & 3']
|
||||
|
||||
|
||||
Both words should be emphasized **isystem.connect**.
|
||||
But not the last period. For **example**, comma should not be emphasized.
|
||||
Similar **for**: double colon.
|
||||
Both words should be emphasized **isystem.connect**.
|
||||
But not the last period. For **example**, comma should not be emphasized.
|
||||
Similar **for**: double colon.
|
||||
|
||||
Spaces at the start of line should be taken into account:
|
||||
:type id: int
|
||||
:param id: used as prefix in log
|
||||
statements. The default value is empty string, which is OK if
|
||||
there is only one app. instance. Example:
|
||||
Spaces at the start of line should be taken into account:
|
||||
:type id: int
|
||||
:param id: used as prefix in log
|
||||
statements. The default value is empty string, which is OK if
|
||||
there is only one app. instance. Example:
|
||||
|
||||
ctrl.setBP("func1");
|
||||
ctrl.setBP("func1");
|
||||
|
||||
If we set the id to ``main_``, we get:
|
||||
If we set the id to ``main_``, we get:
|
||||
|
||||
main_ctrl.setBP("func1");
|
||||
main_ctrl.setBP("func1");
|
||||
|
||||
|
||||
:type fileName: string
|
||||
:param fileName: name of the log file
|
||||
"""
|
||||
:type fileName: string
|
||||
:param fileName: name of the log file"""
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,72 +7,61 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_parsing.someFunction.__doc__,
|
||||
r"""
|
||||
The function comment
|
||||
""")
|
||||
The function comment""")
|
||||
commentVerifier.check(doxygen_parsing.SomeClass.__doc__,
|
||||
r"""
|
||||
The class comment
|
||||
""")
|
||||
The class comment""")
|
||||
commentVerifier.check(doxygen_parsing.SomeStruct.__doc__,
|
||||
r"""
|
||||
The struct comment
|
||||
""")
|
||||
The struct comment""")
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.__init__.__doc__,
|
||||
r"""
|
||||
*Overload 1:*
|
||||
First overloaded constructor.
|
||||
r""" *Overload 1:*
|
||||
First overloaded constructor.
|
||||
|
||||
|
|
||||
|
|
||||
|
||||
*Overload 2:*
|
||||
Second overloaded constructor.
|
||||
""")
|
||||
*Overload 2:*
|
||||
Second overloaded constructor.""")
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethod.__doc__,
|
||||
r"""
|
||||
The class method comment.
|
||||
The class method comment.
|
||||
|
||||
SomeAnotherClass#classMethodExtended(int, int) a link text
|
||||
""")
|
||||
SomeAnotherClass#classMethodExtended(int, int) a link text""")
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended.__doc__,
|
||||
r"""
|
||||
The class method with parameter
|
||||
The class method with parameter
|
||||
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b
|
||||
"""
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b"""
|
||||
)
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended2.__doc__,
|
||||
r"""
|
||||
The class method with parameter
|
||||
The class method with parameter
|
||||
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b
|
||||
"""
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b"""
|
||||
)
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherStruct.structMethod.__doc__,
|
||||
r"""
|
||||
The struct method comment
|
||||
""")
|
||||
The struct method comment""")
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherStruct.structMethodExtended.__doc__,
|
||||
r"""
|
||||
The struct method with parameter
|
||||
The struct method with parameter
|
||||
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b
|
||||
"""
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b"""
|
||||
)
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherStruct.structMethodExtended2.__doc__,
|
||||
r"""
|
||||
The struct method with parameter
|
||||
The struct method with parameter
|
||||
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b
|
||||
""")
|
||||
:type a: int
|
||||
:param a: Parameter a
|
||||
:type b: int
|
||||
:param b: Parameter b""")
|
||||
|
|
|
|||
|
|
@ -8,46 +8,45 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func01.__doc__,
|
||||
r"""
|
||||
*Hello*
|
||||
*Hello*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* some list item
|
||||
* some list item
|
||||
|
||||
This is attention!
|
||||
You were warned!
|
||||
This is attention!
|
||||
You were warned!
|
||||
|
||||
Authors: lots of them
|
||||
Author: Zubr
|
||||
Authors: lots of them
|
||||
Author: Zubr
|
||||
|
||||
**boldword**
|
||||
**boldword**
|
||||
|
||||
Some brief description,
|
||||
extended to many lines.
|
||||
Some brief description,
|
||||
extended to many lines.
|
||||
|
||||
Not everything works right now...
|
||||
``codeword``
|
||||
Not everything works right now...
|
||||
``codeword``
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'citationword'
|
||||
'citationword'
|
||||
|
||||
|
||||
.. code-block:: c++
|
||||
.. code-block:: c++
|
||||
|
||||
some test code
|
||||
|
||||
""")
|
||||
some test code
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func02.__doc__,
|
||||
r"""
|
||||
Conditional comment: SOMECONDITION
|
||||
Some conditional comment
|
||||
End of conditional comment.
|
||||
Conditional comment: SOMECONDITION
|
||||
Some conditional comment
|
||||
End of conditional comment.
|
||||
|
||||
|
||||
|
||||
|
|
@ -55,23 +54,22 @@ r"""
|
|||
|
||||
|
||||
|
||||
Copyright: some copyright
|
||||
Copyright: some copyright
|
||||
|
||||
1970 - 2012
|
||||
1970 - 2012
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Deprecated: Now use another function
|
||||
Deprecated: Now use another function
|
||||
|
||||
This is very large
|
||||
and detailed description of some thing
|
||||
""")
|
||||
This is very large
|
||||
and detailed description of some thing""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func03.__doc__,
|
||||
r"""
|
||||
Comment for **func03()**.
|
||||
Comment for **func03()**.
|
||||
|
||||
|
||||
|
||||
|
|
@ -81,34 +79,34 @@ r"""
|
|||
|
||||
|
||||
|
||||
*italicword*
|
||||
*italicword*
|
||||
|
||||
emphazedWord
|
||||
emphazedWord
|
||||
|
||||
|
||||
|
||||
Example: someFile.txt
|
||||
Some details on using the example
|
||||
""")
|
||||
Example: someFile.txt
|
||||
Some details on using the example""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func04.__doc__,
|
||||
r"""
|
||||
:raises: SuperError
|
||||
|
||||
:raises: SuperError
|
||||
|
||||
|
||||
|
||||
:math:`\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}`
|
||||
:math:`\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}`
|
||||
|
||||
|
||||
.. math::
|
||||
.. math::
|
||||
|
||||
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
|
||||
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
|
||||
|
||||
|
||||
|
||||
.. math::
|
||||
.. math::
|
||||
|
||||
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
|
||||
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
|
||||
|
||||
|
||||
|
||||
|
|
@ -121,31 +119,30 @@ r"""
|
|||
|
||||
|
||||
|
||||
This will only appear in hmtl
|
||||
|
||||
""")
|
||||
This will only appear in hmtl
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func05.__doc__,
|
||||
r"""
|
||||
If: ANOTHERCONDITION {
|
||||
First part of comment
|
||||
If: SECONDCONDITION {
|
||||
Nested condition text
|
||||
}Else if: THIRDCONDITION {
|
||||
The third condition text
|
||||
}Else: { The last text block
|
||||
}
|
||||
}Else: { Second part of comment
|
||||
If: CONDITION {
|
||||
Second part extended
|
||||
}
|
||||
}
|
||||
If: ANOTHERCONDITION {
|
||||
First part of comment
|
||||
If: SECONDCONDITION {
|
||||
Nested condition text
|
||||
}Else if: THIRDCONDITION {
|
||||
The third condition text
|
||||
}Else: { The last text block
|
||||
}
|
||||
}Else: { Second part of comment
|
||||
If: CONDITION {
|
||||
Second part extended
|
||||
}
|
||||
}
|
||||
|
||||
If not: SOMECONDITION {
|
||||
This is printed if not
|
||||
}
|
||||
If not: SOMECONDITION {
|
||||
This is printed if not
|
||||
}
|
||||
|
||||
Image: testImage.bmp("Hello, world!")
|
||||
Image: testImage.bmp("Hello, world!")
|
||||
|
||||
|
||||
|
||||
|
|
@ -157,35 +154,34 @@ r"""
|
|||
|
||||
|
||||
|
||||
Some text
|
||||
describing invariant.
|
||||
""")
|
||||
Some text
|
||||
describing invariant.""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func06.__doc__,
|
||||
r"""
|
||||
Comment for **func06()**.
|
||||
Comment for **func06()**.
|
||||
|
||||
|
||||
|
||||
|
||||
This will only appear in LATeX
|
||||
This will only appear in LATeX
|
||||
|
||||
|
||||
|
||||
|
||||
* Some unordered list
|
||||
* With lots of items
|
||||
* lots of lots of items
|
||||
* Some unordered list
|
||||
* With lots of items
|
||||
* lots of lots of items
|
||||
|
||||
|
||||
|
||||
|
||||
someMember Some description follows
|
||||
someMember Some description follows
|
||||
|
||||
|
||||
|
||||
|
||||
This will only appear in man
|
||||
This will only appear in man
|
||||
|
||||
|
||||
|
||||
|
|
@ -197,59 +193,62 @@ r"""
|
|||
|
||||
|
||||
|
||||
|
||||
""")
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func07.__doc__,
|
||||
r"""
|
||||
Comment for **func07()**.
|
||||
Comment for **func07()**.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Notes: Here
|
||||
is the note!
|
||||
Notes: Here
|
||||
is the note!
|
||||
|
||||
This is an overloaded member function, provided for convenience.
|
||||
It differs from the above function only in what argument(s) it accepts.
|
||||
This is an overloaded member function, provided for convenience.
|
||||
It differs from the above function only in what argument(s) it accepts.
|
||||
|
||||
someword
|
||||
someword
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Title: The paragraph title
|
||||
The paragraph text.
|
||||
Maybe even multiline
|
||||
Title: The paragraph title
|
||||
The paragraph text.
|
||||
Maybe even multiline
|
||||
|
||||
|
||||
|
||||
:type a: int
|
||||
:param a: the first param
|
||||
:type a: int
|
||||
:param a: the first param
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
""")
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func08.__doc__,
|
||||
r"""
|
||||
Text after anchor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Text after anchor.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Anchor description'
|
||||
'Anchor description'
|
||||
|
||||
'someAnchor' not quoted text is not part of ref tag
|
||||
'someAnchor' not quoted text is not part of ref tag
|
||||
|
||||
'someAnchor'
|
||||
'someAnchor'
|
||||
|
||||
|
||||
|
||||
|
|
@ -259,38 +258,38 @@ r"""
|
|||
|
||||
|
||||
|
||||
Remarks: Some remark text
|
||||
Remarks: Some remark text
|
||||
|
||||
Another remarks section
|
||||
Another remarks section
|
||||
|
||||
:rtype: int
|
||||
:return: Whatever
|
||||
:rtype: int
|
||||
:return: Whatever
|
||||
|
||||
:rtype: int
|
||||
:return: it
|
||||
:rtype: int
|
||||
:return: it
|
||||
|
||||
:rtype: int
|
||||
:return: may return
|
||||
|
||||
""")
|
||||
:rtype: int
|
||||
:return: may return
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func09.__doc__,
|
||||
r"""
|
||||
This will only appear in RTF
|
||||
|
||||
This will only appear in RTF
|
||||
|
||||
|
||||
See also: someOtherMethod
|
||||
See also: someOtherMethod
|
||||
|
||||
|
||||
|
||||
See also: function
|
||||
See also: function
|
||||
|
||||
Same as
|
||||
brief description
|
||||
Same as
|
||||
brief description
|
||||
|
||||
|
||||
|
||||
Since: version 0.0.0.1
|
||||
Since: version 0.0.0.1
|
||||
|
||||
|
||||
|
||||
|
|
@ -306,17 +305,16 @@ r"""
|
|||
|
||||
|
||||
|
||||
:raises: superException
|
||||
:raises: superException
|
||||
|
||||
:raises: RuntimeError
|
||||
""")
|
||||
:raises: RuntimeError""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func10.__doc__,
|
||||
r"""
|
||||
TODO: Some very important task
|
||||
TODO: Some very important task
|
||||
|
||||
:type b: float
|
||||
:param b: B is mentioned again...
|
||||
:type b: float
|
||||
:param b: B is mentioned again...
|
||||
|
||||
|
||||
|
||||
|
|
@ -324,24 +322,23 @@ r"""
|
|||
|
||||
|
||||
|
||||
very long
|
||||
text with tags <sometag>
|
||||
very long
|
||||
text with tags <sometag>
|
||||
|
||||
|
||||
|
||||
|
||||
Version: 0.0.0.2
|
||||
Version: 0.0.0.2
|
||||
|
||||
Warning: This is senseless!
|
||||
Warning: This is senseless!
|
||||
|
||||
|
||||
|
||||
|
||||
This will only appear in XML
|
||||
This will only appear in XML
|
||||
|
||||
|
||||
Here goes test of symbols:
|
||||
$ @ \ & ~ < > # % " . ::
|
||||
Here goes test of symbols:
|
||||
$ @ \ & ~ < > # % " . ::
|
||||
|
||||
And here goes simple text
|
||||
""")
|
||||
And here goes simple text""")
|
||||
|
|
|
|||
|
|
@ -8,35 +8,34 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_translate_links.function.__doc__,
|
||||
r"""
|
||||
Testing typenames converting in @ link
|
||||
Testing typenames converting in @ link
|
||||
|
||||
superFunc(int,std::string)
|
||||
Test for std_string member
|
||||
superFunc(int,std::string)
|
||||
Test for std_string member
|
||||
|
||||
|
||||
superFunc(int,long,void*)
|
||||
Test for simple types
|
||||
superFunc(int,long,void*)
|
||||
Test for simple types
|
||||
|
||||
|
||||
superFunc(Shape::superType*)
|
||||
Test for custom types
|
||||
superFunc(Shape::superType*)
|
||||
Test for custom types
|
||||
|
||||
|
||||
superFunc(int**[13])
|
||||
Test for complex types
|
||||
superFunc(int**[13])
|
||||
Test for complex types
|
||||
|
||||
|
||||
same works for 'See also:' links:
|
||||
same works for 'See also:' links:
|
||||
|
||||
See also: superFunc(int,std::string)
|
||||
See also: superFunc(int,long,void*)
|
||||
See also: superFunc(Shape::superType*)
|
||||
See also: superFunc(int**[13])
|
||||
See also: superFunc(int,std::string)
|
||||
See also: superFunc(int,long,void*)
|
||||
See also: superFunc(Shape::superType*)
|
||||
See also: superFunc(int**[13])
|
||||
|
||||
some failing params:
|
||||
some failing params:
|
||||
|
||||
See also: superFunc()
|
||||
See also: superFunc()
|
||||
See also: superFunc()
|
||||
|
||||
""")
|
||||
See also: superFunc()
|
||||
See also: superFunc()
|
||||
See also: superFunc()
|
||||
""")
|
||||
|
|
|
|||
|
|
@ -8,267 +8,263 @@ import commentVerifier
|
|||
|
||||
commentVerifier.check(doxygen_translate.function.__doc__,
|
||||
r"""
|
||||
*Hello*
|
||||
*Hello*
|
||||
|
||||
* some list item
|
||||
* some list item
|
||||
|
||||
Authors: lots of them
|
||||
Authors: lots of them
|
||||
|
||||
Author: Zubr
|
||||
Author: Zubr
|
||||
|
||||
**boldword**
|
||||
**boldword**
|
||||
|
||||
``codeword``
|
||||
``codeword``
|
||||
|
||||
'citationword'
|
||||
'citationword'
|
||||
|
||||
|
||||
.. code-block:: c++
|
||||
.. code-block:: c++
|
||||
|
||||
some test code
|
||||
some test code
|
||||
|
||||
|
||||
Conditional comment: SOMECONDITION
|
||||
Some conditional comment
|
||||
End of conditional comment.
|
||||
Conditional comment: SOMECONDITION
|
||||
Some conditional comment
|
||||
End of conditional comment.
|
||||
|
||||
Copyright: some copyright
|
||||
Copyright: some copyright
|
||||
|
||||
Deprecated: Now use another function
|
||||
Deprecated: Now use another function
|
||||
|
||||
*italicword*
|
||||
*italicword*
|
||||
|
||||
Example: someFile.txt
|
||||
Some details on using the example
|
||||
Example: someFile.txt
|
||||
Some details on using the example
|
||||
|
||||
:raises: SuperError
|
||||
:raises: SuperError
|
||||
|
||||
If: ANOTHERCONDITION {
|
||||
First part of comment
|
||||
If: SECONDCONDITION {
|
||||
Nested condition text
|
||||
}Else if: THIRDCONDITION {
|
||||
The third condition text
|
||||
}Else: { The last text block
|
||||
}
|
||||
}Else: { Second part of comment
|
||||
If: CONDITION {
|
||||
Second part extended
|
||||
}
|
||||
}
|
||||
If: ANOTHERCONDITION {
|
||||
First part of comment
|
||||
If: SECONDCONDITION {
|
||||
Nested condition text
|
||||
}Else if: THIRDCONDITION {
|
||||
The third condition text
|
||||
}Else: { The last text block
|
||||
}
|
||||
}Else: { Second part of comment
|
||||
If: CONDITION {
|
||||
Second part extended
|
||||
}
|
||||
}
|
||||
|
||||
If not: SOMECONDITION {
|
||||
This is printed if not
|
||||
}
|
||||
If not: SOMECONDITION {
|
||||
This is printed if not
|
||||
}
|
||||
|
||||
Image: testImage.bmp("Hello, world!")
|
||||
Image: testImage.bmp("Hello, world!")
|
||||
|
||||
|
||||
|
||||
* Some unordered list
|
||||
* With lots of items
|
||||
* lots of lots of items
|
||||
* Some unordered list
|
||||
* With lots of items
|
||||
* lots of lots of items
|
||||
|
||||
|
||||
|
||||
someMember Some description follows
|
||||
someMember Some description follows
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Notes: Here
|
||||
is the note!
|
||||
Notes: Here
|
||||
is the note!
|
||||
|
||||
This is an overloaded member function, provided for convenience.
|
||||
It differs from the above function only in what argument(s) it accepts.
|
||||
This is an overloaded member function, provided for convenience.
|
||||
It differs from the above function only in what argument(s) it accepts.
|
||||
|
||||
someword
|
||||
someword
|
||||
|
||||
|
||||
|
||||
Title: The paragraph title
|
||||
The paragraph text.
|
||||
Maybe even multiline
|
||||
Title: The paragraph title
|
||||
The paragraph text.
|
||||
Maybe even multiline
|
||||
|
||||
:type a: int
|
||||
:param a: the first param
|
||||
:type a: int
|
||||
:param a: the first param
|
||||
|
||||
Remarks: Some remark text
|
||||
Remarks: Some remark text
|
||||
|
||||
Another remarks section
|
||||
Another remarks section
|
||||
|
||||
:rtype: int
|
||||
:return: Whatever
|
||||
:rtype: int
|
||||
:return: Whatever
|
||||
|
||||
:rtype: int
|
||||
:return: it
|
||||
:rtype: int
|
||||
:return: it
|
||||
|
||||
:rtype: int
|
||||
:return: may return
|
||||
:rtype: int
|
||||
:return: may return
|
||||
|
||||
See also: someOtherMethod
|
||||
See also: someOtherMethod
|
||||
|
||||
See also: function
|
||||
See also: function
|
||||
|
||||
Since: version 0.0.0.1
|
||||
Since: version 0.0.0.1
|
||||
|
||||
:raises: superException
|
||||
:raises: superException
|
||||
|
||||
:raises: RuntimeError
|
||||
:raises: RuntimeError
|
||||
|
||||
TODO: Some very important task
|
||||
TODO: Some very important task
|
||||
|
||||
:type b: float
|
||||
:param b: B is mentioned again...
|
||||
:type b: float
|
||||
:param b: B is mentioned again...
|
||||
|
||||
|
||||
very long
|
||||
text with tags <sometag>
|
||||
very long
|
||||
text with tags <sometag>
|
||||
|
||||
|
||||
Version: 0.0.0.2
|
||||
Version: 0.0.0.2
|
||||
|
||||
Warning: This is senseless!
|
||||
Warning: This is senseless!
|
||||
|
||||
Here goes test of symbols:
|
||||
$ @ \ & ~ < > # % " . ::
|
||||
Here goes test of symbols:
|
||||
$ @ \ & ~ < > # % " . ::
|
||||
|
||||
And here goes simple text
|
||||
"""
|
||||
And here goes simple text"""
|
||||
)
|
||||
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_translate.htmlFunction.__doc__,
|
||||
r"""
|
||||
Test for html tags. See Doxygen doc for list of tags recognized by Doxygen.
|
||||
Test for html tags. See Doxygen doc for list of tags recognized by Doxygen.
|
||||
|
||||
This is link ("http://acme.com/index.html")
|
||||
**bold**
|
||||
Quote:
|
||||
Quotation block.
|
||||
("http://www.worldwildlife.org/who/index.html")
|
||||
This is link ("http://acme.com/index.html")
|
||||
**bold**
|
||||
Quote:
|
||||
Quotation block.
|
||||
("http://www.worldwildlife.org/who/index.html")
|
||||
|
||||
|
||||
center
|
||||
``this is code``
|
||||
center
|
||||
``this is code``
|
||||
|
||||
|
||||
Starts an item title.
|
||||
Starts an item description.
|
||||
Starts an item title.
|
||||
Starts an item description.
|
||||
|
||||
|
||||
Starts a piece of text displayed in a typewriter font.
|
||||
Starts a piece of text displayed in a typewriter font.
|
||||
|
||||
Starts a section with a specific style (HTML only)
|
||||
Starts a section with a specific style (HTML only)
|
||||
|
||||
**Starts a piece of text displayed in an italic font.**
|
||||
**Starts a piece of text displayed in an italic font.**
|
||||
|
||||
'Form' does not generate any output.
|
||||
'Form' does not generate any output.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
# Heading 1
|
||||
# Heading 1
|
||||
|
||||
## Heading 2
|
||||
## Heading 2
|
||||
|
||||
### Heading 3
|
||||
### Heading 3
|
||||
|
||||
*Starts a piece of text displayed in an italic font.*
|
||||
Input tag.
|
||||
Image: src="slika.png"
|
||||
Meta tag.
|
||||
Multicol is ignored by doxygen.
|
||||
*Starts a piece of text displayed in an italic font.*
|
||||
Input tag.
|
||||
Image: src="slika.png"
|
||||
Meta tag.
|
||||
Multicol is ignored by doxygen.
|
||||
|
||||
|
||||
|
||||
* List item 1.
|
||||
* List item 2.
|
||||
* List item 1.
|
||||
* List item 2.
|
||||
|
||||
|
||||
|
||||
Starts a new paragraph.
|
||||
Starts a new paragraph.
|
||||
|
||||
Starts a preformatted fragment.
|
||||
Starts a preformatted fragment.
|
||||
|
||||
Starts a section of text displayed in a smaller font.
|
||||
Starts a section of text displayed in a smaller font.
|
||||
|
||||
'Starts an inline text fragment with a specific style.'
|
||||
**Starts a section of bold text.**
|
||||
Starts a piece of text displayed in subscript.
|
||||
Starts a piece of text displayed in superscript.
|
||||
'Starts an inline text fragment with a specific style.'
|
||||
**Starts a section of bold text.**
|
||||
Starts a piece of text displayed in subscript.
|
||||
Starts a piece of text displayed in superscript.
|
||||
|
||||
|
||||
Animals
|
||||
| Column 1 | Column 2 |
|
||||
-----------------------
|
||||
| cow | dog |
|
||||
| cat | mouse |
|
||||
| horse | parrot |
|
||||
Animals
|
||||
| Column 1 | Column 2 |
|
||||
-----------------------
|
||||
| cow | dog |
|
||||
| cat | mouse |
|
||||
| horse | parrot |
|
||||
|
||||
|
||||
Starts a piece of text displayed in a typewriter font.
|
||||
Starts a piece of text displayed in a typewriter font.
|
||||
|
||||
Starts a piece of text displayed in a typewriter font.
|
||||
Starts a piece of text displayed in a typewriter font.
|
||||
|
||||
|
||||
|
||||
* List item 1.
|
||||
* List item 2.
|
||||
* List item 3.
|
||||
* List item 1.
|
||||
* List item 2.
|
||||
* List item 3.
|
||||
|
||||
|
||||
*Starts a piece of text displayed in an italic font.*
|
||||
*Starts a piece of text displayed in an italic font.*
|
||||
|
||||
|
||||
<u>underlined \b bold text - doxy commands are ignored inside 'htmlonly' section </u>
|
||||
|
||||
""")
|
||||
<u>underlined \b bold text - doxy commands are ignored inside 'htmlonly' section </u>
|
||||
""")
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_translate.htmlTableFunction.__doc__,
|
||||
r"""
|
||||
The meaning of flags:
|
||||
The meaning of flags:
|
||||
|
||||
:type byFlags: int
|
||||
:param byFlags: bits marking required items:
|
||||
:type byFlags: int
|
||||
:param byFlags: bits marking required items:
|
||||
|
||||
| Size in bits| Items Required |
|
||||
--------------------------------
|
||||
| 1 - 8 | 1 |
|
||||
| 9 - 16 | 2 |
|
||||
| 17 - 32 | 4 |
|
||||
| Size in bits| Items Required |
|
||||
--------------------------------
|
||||
| 1 - 8 | 1 |
|
||||
| 9 - 16 | 2 |
|
||||
| 17 - 32 | 4 |
|
||||
|
||||
Almost all combinations of above flags are supported by
|
||||
``htmlTable...`` functions.
|
||||
""")
|
||||
Almost all combinations of above flags are supported by
|
||||
``htmlTable...`` functions.""")
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_translate.htmlEntitiesFunction.__doc__,
|
||||
r"""
|
||||
All entities are treated as commands (C) TM (R)
|
||||
should work also<in text
|
||||
>
|
||||
&
|
||||
'
|
||||
"
|
||||
`
|
||||
'
|
||||
"
|
||||
"
|
||||
-
|
||||
--
|
||||
All entities are treated as commands (C) TM (R)
|
||||
should work also<in text
|
||||
>
|
||||
&
|
||||
'
|
||||
"
|
||||
`
|
||||
'
|
||||
"
|
||||
"
|
||||
-
|
||||
--
|
||||
|
||||
x
|
||||
-
|
||||
.
|
||||
~
|
||||
<=
|
||||
>=
|
||||
<--
|
||||
-->
|
||||
Not an html entity - ignored by Doxygen.
|
||||
Not an &text html entity - ampersand is replaced with entity.
|
||||
""")
|
||||
x
|
||||
-
|
||||
.
|
||||
~
|
||||
<=
|
||||
>=
|
||||
<--
|
||||
-->
|
||||
Not an html entity - ignored by Doxygen.
|
||||
Not an &text html entity - ampersand is replaced with entity.""")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue