The code blocks test is intended to test code block language options
and python doctest translation that is supported for Python, but the
doxygen constructs are still recognized when translating comments for
Java (it is just that the code language option is not used).
A doctest code block begins with ">>>" and is not indented. Identify
these in doxygen comments and treat them accordingly. Also add check
to padCodeAndVerbatimBlocks for these because Sphinx requires an empty
line before.
Add test case to doxygen_code_blocks.i.
This does somewhat more detailed testing of the code block parsing,
and also exercises the language identification of python doctest
features. For now, it is only tested by python (javadoc translation
may not correctly handle some of the characters that are used here).
If the parameter has a default value, add the string ", optional" to
the parameter type description in the translated python comments.
Three examples with default values were already present in the test
cases, so their expected python output has been updated accordingly.
For doxygen comments that specify parameter direction (i.e.,
\param[in], \param[out], and \param[in,out]), the direction is
appended to the type definition in the generated Python documentation.
Updated expected python output for doxygen test case.
Recognize \param[in], \param[out], and \param[in,out]. Currently they
are all treated the same as \param, but the information is now
available for inclusion in the translated comments. This is done
using new utility functions getBaseCommand and getEndOfWordCommand,
which will also generalize to treatment of code command options,
e.g. \code{.py}. Preliminary treatment of the extended version of
\code is already in place in these functions.
Added examples of all three new \param commands to the
doxygen_translate_all_tags test and updated the python and java
expected output.
Fix regression in 4.0.0 where a template function containing a parameter
with the same name as the function name led to the parameter name used in the
target language being incorrectly modified.
Closes#1602
Fixes parallel make where each invocation of swig was writing and
deleting the same file resulting in lots of the newly introduced
warning messages:
On exit, could not delete file xxx.py: No such file or directory
This testcase was only run in Ruby and Python and implements an
obscure feature where a C++ class inherits from a std::wstring.
The li_std_wstring test is left in place to be modified in next commit
for more regular wstring testing across all languages.
* annotation_quoting:
Examples: Unify string quoting in the Python sources
Test-suite: Unify string quoting in the Python sources
Tools: Unify string quoting in the Python sources
Generator: Unify string quoting in generated Python sources
Generator: Remove trailing whitespaces in the Python module
* csharp-set-fixes:
Fix std::vector<> Java typemaps for primitive types
Allow std::set<> C# typemaps to work for non-nullable types too
Replace leftover string with the proper type in C# set typemap
The value of the first item of an enum with a trailing comma after its
last item was not correctly initialized to 0 any more after the changes
of 74adaa5738 (see #1515) because "_last"
attribute was not set correctly in this case.
Do set it for the last item when it's followed by a comma too and add
more unit tests checking for this.
Closes#1566.
For such types, the generated proxy class inherited from
java.util.AbstractSet<BoxedType<T>> (where BoxedType<T> is "Integer",
for example, when T is "int"), but defined an overloaded add() taking T,
instead of overriding the base class virtual add() taking BoxedType<T>,
resulting in an exception being thrown whenever add() was called during
run-time.
Extend Java unit test to bring it to parity with C# one added in the
previous commit.
See #1568.
Notably make them work for primitive types, such as "int".
Doing this requires using "object" instead of the actual C# type of the
variable to store the current value in the iterator, as we don't
currently have a "csnullabletype" typemap that would expand to "T" for
nullable types and "T?" for the other ones. This is a bit ugly, but it
shouldn't matter much for the generated code and is already done in
std::vector<> typemaps.
Also add a simple unit test verifying the basic functionality for such
vectors.
Closes#1568.
This is just a mistake remaining from generalizing the old
string-specific typemap to any type.
Fix it now and update a unit test to test for sets of objects other than
strings.
* patch-1:
nested_inheritance_interface testcase enhancement
Add nested_inheritance_interface test for csharp
Fix class name for nested classes
Add nested_inheritance_interface test
Fix class name for nested classes
Conflicts:
CHANGES.current
Fix how end of paragraph is identified when parsing \code and
\verbatim blocks that appear within a paragraph and contain an empty
line. Previously this would generate a warning for unexpected end of
doxygen comments, and it could generate a segfault due to
dereferencing an invalid iterator value.
The doxygen_basic_translate.i and doxygen_basic_translate_style2.i
tests have been updated to serve as regression tests for this
behavior. Prior to this fix, inclusion of the empty code block line
in this context produced a segfault.
Default marshalling for bool[] now uses 1-byte entries in the array, to
ensure array contents is as expected in C++.
When running under mono csharp_lib_arrays_bool testcase will fail
due to an apparent bug in mono. Works correctly under Microsoft's
runtime. See https://github.com/mono/mono/issues/15592
* doxy/space:
Ensure empty line before code and math blocks in doxygen pydoc
Remove extra newline before code block in doxygen python output
Clarify python doxygen code block indentation handling
Cleanup of pydoc translator newline trimming
Correction to recently added doxygen python test case
Adjust expected python output for doxygen style2 test
Adding test for second doxygen comment style
Fix bug in doxygen python code block indent
Eliminate extra newlines around doxygen python block math
Eliminate extra newlines in doxygen python \verbatim blocks
Remove extra newline from end of doxygen python \code command
Remove extra newline in beginning of doxygen python \code command
Fix python doxygen indentation for inline \code command
Fixes:
Undefined symbols for architecture x86_64: "___cxa_deleted_virtual"
which clang issues when a class deletes a method (seems to be when the
function is not one of the compiler's automatically added special member
functions).
'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior [-Werror,-Wconstexpr-not-const]
Sphinx requires an empty line before code and math blocks, whereas
doxygen does not. This update ensures that a blank line is included
before generated code and math blocks in the pydoc output. This is
done by post-processing the docstring line by line to check whether
any newlines need to be added. This way, if the original doxygen
source already includes an empty line before a block, an additional
unnecessary empty line is not added.
Updating the expected test output for doxygen_basic_translate, which
now adds the necessary empty line before the code block. Adding
further test cases to doxygen_translate_all_tags to explicitly verify
that a newline is added in the pydoc output before both code and math
blocks that appear within a paragraph.
Additionally, empty lines previously appearing at the beginning of the
generated docstrings are now removed. This does not alter the
behavior of the tests.
cpp11_rvalue_reference3_wrap.cxx:256:38: warning: binding reference member 'member_rvalue_ref_ptr1' to
a temporary value [-Wdangling-field]
Thing *&& member_rvalue_ref_ptr1 = 0;
^