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.
40 lines
707 B
Python
40 lines
707 B
Python
#!/usr/bin/python
|
|
|
|
import doxygen_translate_links
|
|
import inspect
|
|
import string
|
|
import sys
|
|
import commentVerifier
|
|
|
|
|
|
commentVerifier.check(inspect.getdoc(doxygen_translate_links.function),
|
|
r"""Testing typenames converting in @ link
|
|
|
|
superFunc(int,std::string)
|
|
Test for std_string member
|
|
|
|
|
|
superFunc(int,long,void*)
|
|
Test for simple types
|
|
|
|
|
|
superFunc(Shape::superType*)
|
|
Test for custom types
|
|
|
|
|
|
superFunc(int**[13])
|
|
Test for complex types
|
|
|
|
|
|
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])
|
|
|
|
some failing params:
|
|
|
|
See also: superFunc()
|
|
See also: superFunc()
|
|
See also: superFunc()""")
|