- Document change in CHANGES file
- Minor tweaks and whitespace fixes in stype.c
- Enhance testcase
- Synchronise Java and Python runt test in testcase
Closes#1977Fixes#1603
Squashed commit of the following:
commit 61f794184e
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:20:25 2021 +0100
added python version for second part of testcase
commit bb80e236b8
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:10:14 2021 +0100
reworked comment in fixed code
commit 5a94bcc481
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:07:34 2021 +0100
removed new unittests; I switched to the official test cases
commit 36603f3c8d
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 15:05:33 2021 +0100
removed new unittests; I switched to the official test cases
commit 1f20ea00d2
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 14:39:19 2021 +0100
adapted testcase
commit ab492794c0
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 14:29:10 2021 +0100
fixed test
commit 9b5dd0c8f9
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 13:04:06 2021 +0100
C99 compatible comments
commit 1a89425ac8
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 20 11:41:48 2021 +0100
added extra checks to prevent accidental partial matches
commit 20e76f511a
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:42:56 2021 +0100
minor
commit 0e383bbb76
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:41:45 2021 +0100
cleanup
commit b644767121
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:39:43 2021 +0100
cleanup
commit 2574468c0f
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:38:35 2021 +0100
cleanup
commit 9dc7f1ed30
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:35:28 2021 +0100
removed ide files
commit a442a9df46
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:32:36 2021 +0100
removed printf
commit da4c6e91e3
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:29:02 2021 +0100
possible fix found
commit 6fad8d40e3
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Thu Mar 18 21:01:11 2021 +0100
found difference between good/bad case... next: analyze why replacement did not work here...
commit 72a7693340
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 22:43:08 2021 +0100
ideintified location where the template-template type is inserted in the final type (with the missing specialization).
commit 1b53312c07
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 22:28:19 2021 +0100
more notes (to be reverted)
commit a9a0b58938
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 22:19:16 2021 +0100
some experiments (to be reverted)
commit 0e7a24bbd5
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Wed Mar 17 21:46:20 2021 +0100
added some notes
commit 2f77911a12
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 22:01:01 2021 +0100
comment changed
commit 2cb7213b06
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 21:55:47 2021 +0100
renamed example template parameters to easily distinguish them.
commit ff457d7397
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 21:21:10 2021 +0100
added reset parser functionality (required for unittests, to reset parser)
commit 617bbde3b4
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Tue Mar 16 20:47:41 2021 +0100
adjusted test for simple templates
commit beb7e7f77c
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Mon Mar 15 07:41:17 2021 +0100
added note how it should be...
commit 7b3328431c
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 17:07:24 2021 +0100
found a place which is maybe problematic for the template_template problem (#1603)
commit 46c2443d15
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 16:11:56 2021 +0100
unitests: reset parser for each testcase
commit b3a0f1516f
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 15:30:47 2021 +0100
first experiment with templates
commit 32a11c6c77
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:31:17 2021 +0100
wip
commit 37b805ba6e
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:21:05 2021 +0100
integrated unittests in ctest
commit 79f7bee168
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:18:26 2021 +0100
wip: new test created; problem: not in c++ mode
commit 345d503d55
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:08:09 2021 +0100
cleanup test code
commit 0a26adec10
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 14:05:24 2021 +0100
some more tests (first steps with c++ code)
commit 6f628e0fa9
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sun Mar 14 12:56:41 2021 +0100
experiments
commit c4a13bf3e1
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 13 18:18:01 2021 +0100
first experiment
commit 7d26586105
Author: goto40 <pierre.bayerl@googlemail.com>
Date: Sat Mar 13 17:23:13 2021 +0100
setup catch2 framework (w/o tests)
This is done in preparation for adding namespace support to the Ruby
part of SWIG. Some existing test cases were reorganized or duplicated
for flat/nonflat nesting. For some a Ruby test script was added.
Finally the ruby/Makefile.in was improved so that for test cases
without an explicit test script, the generated wrapper library will
be loaded by the Ruby interpreter to ensure loading works fine.
The "endlink" command is processed in processWordCommands, which by
default skips space occuring after the command, which is intended for
removing leading space from a command argument. For "end" commands,
we don't want to do this. Note that certain end commands such as
"endcode" aren't processed by processWordCommands (believe
addCommandUnique ends up handling them).
Update usage of \link in doxygen_translate_all_tags.i to test handling
of space after \endlink.
Tweaking some of the usage in doxygen_misc_constructs.i to remove what
seems to be an extra space from the input (otherwise we would need to
add an extra space to the expected output).
In addition to the changes in the previous commit, also avoid syntax
errors in the generated Python docstrings by splitting them into several
parts if there are 3 quotes in a row in the input, as it's impossible to
have them inside triple-quoted strings, generally speaking (i.e. if
there are occurrences of both """ and ''' inside the string).
Single-line Doxygen comments ending with a double quote resulted in
syntactically-invalid Python docstrings in the output, so use triple
single quotes as delimiters in this case to avoid it.
* shared-ptr-template-upcast:
comments
Applying shared_ptr template upcast fix to CSharp, adding CSharp test, and cleanup
Adding test case demonstrating issue where SWIG does not generate a correctly typed, upcasted shared_ptr for a template instantiation deriving from a base class
WIP - Use the non-encoded type string for upcasting a shared_ptr of a derived type to a shared_ptr of the base type
comments
Applying shared_ptr template upcast fix to CSharp, adding CSharp test, and cleanup
Adding test case demonstrating issue where SWIG does not generate a correctly typed, upcasted shared_ptr for a template instantiation deriving from a base class
WIP - Use the non-encoded type string for upcasting a shared_ptr of a derived type to a shared_ptr of the base type
* Issue-1632:
Minor workaround in doxygen_basic_translate_style3 test
Add new test doxygen_basic_translate_style3.i
Fix for newline handling in doxygen "///" style comments
* doxy/commands:
Update documentation for doxygen tags
Fix doxygen translation of \p command for python
Fix doxygen handling of \em tag for python
Minor formatting updates to doxygen docs
Reformat tag lists in doxygen documentation
Add doxygen_code_blocks_runme.java
Special handling for python doctest code blocks
Add new doxygen test doxygen_code_blocks
Handle doxygen code command with language option
Improve doxygen parser handling of \code content
Flag optional arguments in doxygen pydoc output
Add parameter direction to doxygen pydoc output
Support doxygen \param[] commands
Check Java version in configure and define SKIP_DOXYGEN_TEST_CASES if
it's less than 9, which is required by the new implementation of
CommentParser used in the Doxygen tests.
In particular, do not use com.sun.javadoc deprecated since Java 9 and
finally removed in Java 13, to allow the tests to run under modern JRE.
They don't run under Java 8 and earlier any more, but this shouldn't be
a huge problem nowadays and as SWIG output is independent from the Java
version used, it's enough to test it with modern Java versions.
Note that the tests themselves were changed only in the most minimal
way, to adapt them to the new way of running javadoc (which is now also
integrated into CommentParser itself instead of being duplicated in
every test).
With the "///" doxygen comment style, comments within a code block do
not get handled correctly. Modifying the test to remove this case and
adding a note about it for future reference.
Processing doxygen @param comments for a parameter whose name did not
appear in the function declaration would cause a segfault due to a
null pointer dereference.
Adding test cases for both variadic function (no specified arguments)
and @param comment that references an argument that is not named in
the function prototype. Both of these cases previously segfaulted.
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).
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.
* 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.
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.
* 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
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.
This style looks like:
/** Line 1
* Line 2
*/
This is needed to verify fixes to some of the indentation in the
translated comments.
The test is copied from doxygen_basic_translate.i. One adjustment was
made to change the comment style on the last function that left out
the intermediate "*" characters. This does not produce correct output
when combined with this style of starting the text on the first
comment line.
Test results are copied directly from doxygen_basic_translate. A
minor difference in the Python results will be updated in a subsequent
commit.
To correctly parse Doxygen post-comments after the trailing comma,
switch to right recursion in "enumlist" production rule definition: this
does consume more stack space when parsing, but makes the rules much
easier to write and to understand and hopefully shouldn't result in any
problems with real code (which shouldn't have thousands of enums items
in it).
Closes#1514.
Fix crash if "@return" Doxygen tag was used on a node without any return
type (such as a class, for example). Ignoring it might not be the best
thing to do, but it's definitely better than crashing and it's not
really clear what else could be done anyhow.
Closes#1516.