Commit Graph

19 Commits

Author SHA1 Message Date
William S Fulton bb5c46079b Better detection of builtin in Python testcase 2018-08-14 19:16:25 +01:00
William S Fulton 602b0d5a2c Add doxygen testing of Java constructor wrappers 2018-06-18 18:56:21 +01:00
William S Fulton 8234656497 Correct python example headers 2018-05-25 23:35:28 +01:00
William S Fulton 95caf87596 PEP8 conformance for comment verifier module 2018-05-25 07:56:45 +01:00
Vadim Zeitlin 148bcab7a0 Switch Python Doxygen unit tests to use inspect.getdoc()
Using the standard inspect module instead of accessing __doc__ directly allows
the tests to pass both when using and not using -builtin, as whitespace-only
differences between the docstrings don't matter then because inspect.getdoc()
removes the indentation and the leading and trailing spaces.

This is similar to what had been already done for python_docstring unit test
in fa282b3540.
2016-12-12 01:26:05 +01:00
Vadim Zeitlin 8316f08aec Fix Doxygen unit test in Python "-builtin" case.
Unfortunately there doesn't seem to be any way to use docstrings for __init__
methods when using "-builtin", so just disable this particular test then.
2014-12-15 14:11:53 +01:00
Vadim Zeitlin 410b508e9a 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.
2014-12-15 13:59:17 +01:00
Vadim Zeitlin 1f826b0925 Fix translated Doxygen comments for overloaded functions in Python.
The most important change is to ensure that the "Overload" headers added by
PyDocConverter code are indented correctly, i.e. using the same indent level
as the comment itself, otherwise Sphinx directives such as :param: were not
parsed correctly.

Also add a vertical separator using reST "|" formatting character to increase
separation between the overloads.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin 73f6971931 Also merge Doxygen comments for overloaded constructors in Python.
This was done for plain functions/methods but not constructors, which don't
have "kind=function" attribute.

Just don't check for "kind" at all, the presence of "sym:overloaded" should be
good enough to indicate that it's an overloaded something.

Also add a test for overloaded constructors documentation.
2014-08-22 17:45:24 +02:00
Vadim Zeitlin 8b83976f4c Fix arguments of @param, @return etc translations to Python.
For the parameter documentation to be really taken as such, in its entirety,
by Sphinx, it must be indented relative to the :param: tag. Do this by
appending an extra indent after every line of the output and work around the
unnecessary indent of the last line by removing the trailing whitespace.

This required updating the existing tests and removing the expected but not
present any more whitespace from them, but as trailing whitespace in the
documentation is at best insignificant (and at worst harmful) anyhow, this is
not a big price to pay for simpler translator code.
2014-08-22 17:45:22 +02:00
Vadim Zeitlin b374aad0da Use Sphinx-compatible docstring format in PyDocConverter.
Use the more or less standard :param:, :type:, :return: and :raises: in the
function/methods descriptions.

Update the output expected from the Python tests accordingly.
2014-08-13 16:11:30 +02:00
Vadim Zeitlin 6cce652762 Merge latest master into doxygen branch again.
Update Doxygen-specific Python unit tests to work with the new indentation.

Update one of Doxygen-specific Java tests to still build with the new handling
of srcdir.
2014-08-13 16:11:21 +02:00
Marko Klopcic 1bf26f216d tests updated according to fix for the link tag' 2013-04-22 23:08:50 +02:00
Marko Klopcic 08093ec17e updated two additonal tests for python doxygen code comments 2013-02-06 22:59:30 +01:00
Marko Klopcic 29d1bba70a improved comment formatting for Python 2013-02-02 23:01:09 +01:00
Dmitry Kabak 8a683e42d0 Fixed and updated all doxygen python tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13346 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-23 13:50:27 +00:00
Dmitry Kabak dc43241130 Rewritten doxygen_parsing.cpptest according to the project plan
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13275 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-09 14:02:23 +00:00
Dmitry Kabak 774cbc3ef2 Fixed comments parsing, but broken li_boost_shared_ptr_bits test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13210 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-29 19:37:42 +00:00
Dmitry Kabak e3f41f32a6 Added test case to check Doxygen comments parsing, including java and python runtime tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13150 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-04 18:11:29 +00:00