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.
This commit is contained in:
Vadim Zeitlin 2014-06-11 02:21:43 +02:00
commit 6cce652762
557 changed files with 4998 additions and 4138 deletions

View file

@ -10,10 +10,12 @@ endif
LANGUAGE = python
PYTHON = $(PYBIN)
PEP8 = @PEP8@
#*_runme.py for Python 2.x, *_runme3.py for Python 3.x
PY2SCRIPTSUFFIX = _runme.py
PY3SCRIPTSUFFIX = _runme3.py
PY2TO3 = 2to3 -x import
ifeq (,$(PY3))
SCRIPTSUFFIX = $(PY2SCRIPTSUFFIX)
@ -25,10 +27,6 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
PY2TO3 = 2to3 -x import
CPP_TEST_CASES += \
argcargvtest \
callback \
@ -102,7 +100,8 @@ BUILTIN_NOT_BROKEN = $(filter-out $(BUILTIN_BROKEN),$(NOT_BROKEN_TEST_CASES))
builtin-check : $(BUILTIN_NOT_BROKEN)
# Overridden variables here
LIBS = -L.
SCRIPTDIR = .
LIBS = -L.
VALGRIND_OPT += --suppressions=pythonswig.supp
# Custom tests - tests with additional commandline options
@ -113,57 +112,76 @@ VALGRIND_OPT += --suppressions=pythonswig.supp
+$(convert_testcase)
$(setup)
+$(swig_and_compile_cpp)
$(check_pep8)
$(run_testcase)
%.ctest:
+$(convert_testcase)
$(setup)
+$(swig_and_compile_c)
$(check_pep8)
$(run_testcase)
%.multicpptest:
+$(convert_testcase)
$(setup)
+$(swig_and_compile_multi_cpp)
$(check_pep8_multi_cpp)
$(run_testcase)
# Call 2to3 to generate Python 3.x test from the Python 2.x's *_runme.py file
%$(PY3SCRIPTSUFFIX): %$(PY2SCRIPTSUFFIX)
cp $< $@
$(PY2TO3) -w $@ >/dev/null 2>&1
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.py (or _runme3.py for Python 3) appended after the testcase name.
run_python = env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=.:$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
py_runme = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
py2_runme = $(SCRIPTPREFIX)$*$(PY2SCRIPTSUFFIX)
py3_runme = $(SCRIPTPREFIX)$*$(PY3SCRIPTSUFFIX)
py2_runme = $(srcdir)/$(SCRIPTPREFIX)$*$(PY2SCRIPTSUFFIX)
py3_runme = $(srcdir)/$(SCRIPTPREFIX)$*$(PY3SCRIPTSUFFIX)
check_pep8 = \
if [ -n "$(PEP8)" ]; then \
$(PEP8) --ignore=E501,E30,W291,W391 $(SCRIPTPREFIX)$*.py;\
fi
check_pep8_multi_cpp = \
if [ -n "$(PEP8)" ]; then \
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
$(PEP8) --ignore=E501,E30,W291,W391 $$f.py; \
done \
fi
run_python = env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=.:$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(py_runme)
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
if [ -f $(SCRIPTDIR)/$(py_runme) ]; then \
$(run_python);\
fi
ifeq (,$(PY3))
# No copying/conversion needed for in-source-tree Python 2 scripts
ifeq ($(SCRIPTDIR)|$(SCRIPTSUFFIX),$(srcdir)|$(PY2SCRIPTSUFFIX))
convert_testcase =
else
convert_testcase = \
if [ -f $(py2_runme) ]; then \
$(MAKE) -f $(srcdir)/Makefile $(py3_runme); \
if [ -f $(srcdir)/$(py2_runme) ]; then \
$(MAKE) $(SCRIPTDIR)/$(py_runme); \
fi
$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
test x$< = x$@ || cp $< $@ || exit 1
test x$(PY3) = x || $(PY2TO3) -w $@ >/dev/null 2>&1 || exit 1
endif
# Clean: remove the generated .py file
# We only remove the _runme3.py if it is generated by 2to3 from a _runme.py.
%.clean:
@rm -f $*.py;
@#We only remove the _runme3.py if it is generated by 2to3 from a _runme.py.
@if [ -f $(py2_runme) ]; then rm -f $(py3_runme) $(py3_runme).bak; fi
@rm -f $*.py
@if test -f $(srcdir)/$(py2_runme); then rm -f $(SCRIPTDIR)/$(py3_runme) $(SCRIPTDIR)/$(py3_runme).bak; fi
@if test "x$(SCRIPTDIR)" != "x$(srcdir)"; then rm -f $(SCRIPTDIR)/$(py2_runme); fi
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile python_clean
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" python_clean
rm -f hugemod.h hugemod_a.i hugemod_b.i hugemod_a.py hugemod_b.py hugemod_runme.py
rm -f clientdata_prop_a.py clientdata_prop_b.py import_stl_a.py import_stl_b.py
rm -f imports_a.py imports_b.py mod_a.py mod_b.py multi_import_a.py

View file

@ -6,79 +6,79 @@ import sys
import commentVerifier
commentVerifier.check(doxygen_basic_notranslate.function.__doc__,
r"""
\brief
Brief description.
r"""
\brief
Brief description.
The comment text
\author Some author
\return Some number
\sa function2
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.
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.
"""
"""
)
commentVerifier.check(doxygen_basic_notranslate.function3.__doc__,
r"""
----------------------------------------------------------------
Overload 1:
----------------------------------------------------------------
A test for overloaded functions
This is function \b one
----------------------------------------------------------------
Overload 2:
----------------------------------------------------------------
A test for overloaded functions
This is function \b two
"""
r"""
----------------------------------------------------------------
Overload 1:
----------------------------------------------------------------
A test for overloaded functions
This is function \b one
----------------------------------------------------------------
Overload 2:
----------------------------------------------------------------
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
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
\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.
"""
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
r"""
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
r"""
Test for a parameter with difficult type
(mostly for python)
@param a Very strange param
"""
"""
)

View file

@ -6,74 +6,74 @@ import sys
import commentVerifier
commentVerifier.check(doxygen_basic_translate.function.__doc__,
"""
Brief description.
"""
Brief description.
The comment text.
The comment text.
Author: Some author
Author: Some author
Return: Some number
Return: Some number
See also: function2
"""
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:
----------------------------------------------------------------
A test for overloaded functions
This is function __one__
"""
----------------------------------------------------------------
Overload 1:
----------------------------------------------------------------
A test for overloaded functions
This is function __one__
----------------------------------------------------------------
Overload 2:
----------------------------------------------------------------
A test for overloaded functions
This is function __two__
----------------------------------------------------------------
Overload 2:
----------------------------------------------------------------
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
int main() { while(true); }
int main() { while(true); }
}
"""
}
"""
)
commentVerifier.check(doxygen_basic_translate.function5.__doc__,
"""
This is a post comment.
"""
"""
This is a post comment.
"""
)
commentVerifier.check(doxygen_basic_translate.function6.__doc__,
"""
Test for default args
Arguments:
a (int) -- Some parameter, default is 42
"""
"""
Test for default args
Arguments:
a (int) -- Some parameter, default is 42
"""
)
commentVerifier.check(doxygen_basic_translate.function7.__doc__,
"""
Test for a parameter with difficult type
(mostly for python)
Arguments:
a (Shape::superType *[10]) -- Very strange param
"""
"""
Test for a parameter with difficult type
(mostly for python)
Arguments:
a (Shape::superType *[10]) -- Very strange param
"""
)

View file

@ -7,17 +7,17 @@ import commentVerifier
commentVerifier.check(doxygen_misc_constructs.getAddress.__doc__,
r"""
Returns address of file line.
r"""
Returns address of file line.
Arguments:
fileName (int &) -- name of the file, where the source line is located
line (int) -- line number
isGetSize (bool) -- if set, for every object location both address and size are returned
Arguments:
fileName (int &) -- name of the file, where the source line is located
line (int) -- line number
isGetSize (bool) -- if set, for every object location both address and size are returned
Connection::getId()
Connection::getId()
""")
""")
commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
r"""
@ -38,107 +38,107 @@ commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
""")
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.
"""
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.
"""
)
commentVerifier.check(doxygen_misc_constructs.getConnection.__doc__,
r"""
This function returns connection id.
"""
r"""
This function returns connection id.
"""
)
commentVerifier.check(doxygen_misc_constructs.getFirstLetter.__doc__,
r''
r''
)
commentVerifier.check(doxygen_misc_constructs.ClassWithNestedEnum.__doc__,
r"""
r"""
Class description.
"""
)
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__,
r''
r''
)
commentVerifier.check(doxygen_misc_constructs.backslashA.__doc__,
r"""
Backslash following'word' is a valid doxygen command. Output contains
'followingword' with 'word' in code font.
"""
r"""
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
"""
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
"""
)
commentVerifier.check(doxygen_misc_constructs.backslashC.__doc__,
r"""
Backslash e at end of _line_ froze SWIG
_with_ old comment parser.
r"""
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:
r"""
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:
Arguments:
id (int) -- 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");
If we set the id to 'main_', we get:
main_ctrl.setBP("func1");
Spaces at the start of line should be taken into account:
Arguments:
id (int) -- 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");
If we set the id to 'main_', we get:
main_ctrl.setBP("func1");
fileName (char *) -- name of the log file
"""
fileName (char *) -- name of the log file
"""
);

22
Examples/test-suite/python/doxygen_parsing_runme.py Executable file → Normal file
View file

@ -6,25 +6,25 @@ import sys
import commentVerifier
commentVerifier.check(doxygen_parsing.someFunction.__doc__,
r"""
The function comment
""")
r"""
The function comment
""")
commentVerifier.check(doxygen_parsing.SomeClass.__doc__,
r"""
r"""
The class comment
""")
commentVerifier.check(doxygen_parsing.SomeStruct.__doc__,
r"""
r"""
The struct comment
""")
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethod.__doc__,
r"""
r"""
The class method comment.
SomeAnotherClass#classMethodExtended(int, int) a link text
""")
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended.__doc__,
r"""
r"""
The class method with parameter
Arguments:
@ -33,7 +33,7 @@ r"""
"""
)
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended2.__doc__,
r"""
r"""
The class method with parameter
Arguments:
@ -42,11 +42,11 @@ r"""
"""
)
commentVerifier.check(doxygen_parsing.SomeAnotherStruct.structMethod.__doc__,
r"""
r"""
The struct method comment
""")
commentVerifier.check(doxygen_parsing.SomeAnotherStruct.structMethodExtended.__doc__,
r"""
r"""
The struct method with parameter
Arguments:
@ -55,7 +55,7 @@ r"""
"""
)
commentVerifier.check(doxygen_parsing.SomeAnotherStruct.structMethodExtended2.__doc__,
r"""
r"""
The struct method with parameter
Arguments:

View file

@ -8,42 +8,42 @@ 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'
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.
@ -51,23 +51,23 @@ 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()__.
@ -77,30 +77,30 @@ 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"""
Throws: SuperError
Throws: SuperError
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
@ -113,31 +113,31 @@ 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
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
}
}
}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!")
@ -149,35 +149,35 @@ 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
@ -190,58 +190,58 @@ 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
Arguments:
a (int) -- the first param
Arguments:
a (int) -- 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'
@ -251,35 +251,35 @@ r"""
Remarks: Some remark text
Remarks: Some remark text
Another remarks section
Another remarks section
Return: Whatever
Return: Whatever
it
it
Returns: may return
Returns: 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
@ -295,17 +295,17 @@ r"""
Throw: superException
Throw: superException
Throws: RuntimeError
""")
Throws: RuntimeError
""")
commentVerifier.check(doxygen_translate_all_tags.func10.__doc__,
r"""
TODO: Some very important task
TODO: Some very important task
Arguments:
b (float) -- B is mentioned again...
Arguments:
b (float) -- B is mentioned again...
@ -313,24 +313,24 @@ 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
""")

View file

@ -8,35 +8,35 @@ 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()
""")
""")

302
Examples/test-suite/python/doxygen_translate_runme.py Executable file → Normal file
View file

@ -8,260 +8,260 @@ 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'
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
Throws: SuperError
Throws: SuperError
If: ANOTHERCONDITION {
First part of comment
If: SECONDCONDITION {
Nested condition text
}Else if: THIRDCONDITION {
The third condition text
}Else: { The last text block
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
}
}
}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
Arguments:
a (int) -- the first param
Arguments:
a (int) -- the first param
Remarks: Some remark text
Remarks: Some remark text
Another remarks section
Another remarks section
Return: Whatever
Return: Whatever
it
it
Returns: may return
Returns: 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
Throw: superException
Throw: superException
Throws: RuntimeError
Throws: RuntimeError
TODO: Some very important task
TODO: Some very important task
Arguments:
b (float) -- B is mentioned again...
Arguments:
b (float) -- 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:
Arguments:
byFlags (int) -- bits marking required items:
| 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.
""")
Arguments:
byFlags (int) -- bits marking required items:
| 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.
""")
commentVerifier.check(doxygen_translate.htmlEntitiesFunction.__doc__,
r"""
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.
""")
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.
""")

View file

@ -0,0 +1,14 @@
import sys
import unicode_strings
# The 'u' string prefix isn't valid in Python 3.0 - 3.2 and is redundant
# in 3.3+. Since this file is run through 2to3 before testing, though,
# mark this as a unicode string in 2.x so it'll become a str in 3.x.
test_string = u'h\udce9llo w\u00f6rld'
if sys.version_info[0:2] >= (3, 1):
if unicode_strings.non_utf8_c_str() != test_string:
raise ValueError('Test comparison mismatch')
if unicode_strings.non_utf8_std_string() != test_string:
raise ValueError('Test comparison mismatch')