Commit graph

399 commits

Author SHA1 Message Date
Vadim Zeitlin
300ccce46c Another merge with master.
Change Doxygen error codes to start at 740 instead of at 720 as the latter was
taken by Scilab in the meanwhile.

Resolve conflicts in autodoc_runme.py once again.
2015-02-16 23:46:39 +01:00
William S Fulton
21b176f07f Fix preproc_line_file test 2015-01-26 22:35:17 +00:00
William S Fulton
ee35389d22 Fix abort using template default parameters
Closes #280
2014-12-28 10:39:53 +00:00
William S Fulton
5c57a8c877 Warning suppressions in tests 2014-12-22 20:35:13 +00:00
William S Fulton
68a936a638 Add testcase for nested inner class deriving from a templated base class and defined outside of the outer class.
For languages that don't support nested class support, use flatnested.
See issue #270
2014-12-19 19:35:38 +00:00
William S Fulton
2e01533b23 Partial support for %constant and structs
Test case is slightly modified from the test case in issue #250

Use of constant objects does not seem to work in Python - the type is
SwigPyObject instead of constant_directive.Type1.
2014-12-18 07:01:08 +00:00
Vadim Zeitlin
b7160d92c9 Remove any whitespace before ignored Doxygen commands.
This is done mainly to avoid problems with trailing whitespace in the
generated Python code as this provokes pep8 problems, but is also, arguably,
more logical, as if a command which is on its own on a line is ignored, we
shouldn't leave any whitespace neither (and perhaps should even suppress the
line entirely, in fact).
2014-12-17 04:57:17 +01:00
Vadim Zeitlin
9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
William S Fulton
ae555c2339 Fix templated constructors regression
Templated constructors were incorrectly ignored because SWIG thought they were
methods without a return type.
Regression introduced in swig-3.0.0
Closes #245.
2014-12-09 23:48:37 +00:00
William S Fulton
80ae335319 Enhance C++11 strongly typed enums testcase 2014-11-27 19:56:08 +00:00
William S Fulton
49761fe347 Add Java runtime testcases for C++11 strongly typed enums 2014-11-25 07:08:02 +00:00
William S Fulton
0664ecdeb7 Fix strongly typed enums for Java when using simple enum wrappers 2014-11-24 07:04:54 +00:00
William S Fulton
296d45aec5 Merge branch 'alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java'
* alexey-pelykh-cpp11_strongly_typed_enums__direct_inject_in_java:
  Enhance cpp11_strongly_typed_enumerations testcase and turn it on
  Simplify/improve strongly typed enum implementation for Java
  Rewrite some Java director nested class support code for strongly typed enums
  Expand director_nested_class test to test more than one level of nesting
  Add director_nested_class testcase
  Removed useless code (it does not affect output, at least on our testcases)
  Java/Fix: swig_connect_director used not-fully-qualified classname (proper)
  Java/Fix: swig_connect_director used not-fully-qualified classname
  Java: fix generation of ProxyName when JNI descriptor is requested - for inner classes '$' should be used as separator instead of '/'
  Java: fix invalid director 'self' variable type name (wasn't fully qualified)
  Clean-up test suite and fix issue with nspace, as well as keep the fix for Class::Struct::EnumClass being JNI-referenced as Struct_EnumClass
  C++11 strongly-typed enums fix for Java only (proper)
  Revert "C++11 strongly-typed enums fix for Java only"
  Additional test cases for C++11 strongly-typed enums
  C++11 strongly-typed enums fix for Java only
2014-11-21 07:34:12 +00:00
William S Fulton
92d3146a06 Expand director_nested_class test to test more than one level of nesting 2014-11-10 19:57:49 +00:00
William S Fulton
bca042a7dd Add director_nested_class testcase
Java nested director class test for fix in e7db081d5e
2014-11-07 19:50:20 +00:00
David Nadlinger
a9d7b7f40c Work around D test suite failure due to issue #254.
Object is currently a D keyword for the purposes of SWIG
(that's in fact a little too strict, but Object is the root
of the class hierarchy and some parts of the code break).
'template_typedef_typedef' is supposed to test.
2014-11-06 23:04:35 +01:00
William S Fulton
bfde148887 The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby.

Closes #242
2014-10-21 07:34:51 +01:00
William S Fulton
8441e3eab4 Java gc tests failure fix
Sometimes the GC just won't run the finalizers, so we output a warning
instead of throwing an error, so now the test-suite will pass but with a
warning if the number of objects is not as expected.

Was notably failing on RHEL6 using OpenSUSE build testing with openjdk-1.6
2014-10-14 19:22:25 +01:00
Vadim Zeitlin
05b5ed11bc Add a possibility to flexibly ignore custom Doxygen tags.
Add %feature("doxygen:ignore:<command>") implementation, documentation and
test case.

This feature allows to use custom tags in C++ Doxygen comments for
C++-specific things that don't make sense in the context of the target
language and also allows to insert contents specific to the target language in
the C++ comments using (different) custom commands, which is very useful in
practice to explain the particularities of the API wrappers.
2014-09-11 01:39:42 +02:00
Vadim Zeitlin
0f21adf3f9 Add a simple test of multiple parameters to Doxygen test suite.
Ensure that translating more than one @param tag works correctly.
2014-08-22 17:45:23 +02:00
Vadim Zeitlin
14ba3b8dd4 Preserve relative indentation when parsing Doxygen comments.
This is important to preserve the structure of the lists which appear
correctly in Python output without any additional effort if the indentation is
lost.

It is also makes the behaviour consistent for

	/**
	 *
	 *
	 */

comments and those without the asterisks in the middle lines, as now the
indentation is preserved in both cases while it was only preserved when the
asterisks were present previously.
2014-08-22 17:45:22 +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
Yuval Kashtan
093fe2a556 Add support for java.nio.Buffer
including test-suite test case and documentation
2014-07-18 15:45:16 +03:00
William S Fulton
81d023ac05 Merge branch 'wkalinin-csymbols-2' - %extend and nested structs
* wkalinin-csymbols-2:
  Add runtime test for %extend and nested union
  test fixed
  %extend symbols for nested structs get into a wrong C symbol table
2014-06-02 07:11:22 +01:00
William S Fulton
5f3ee109c8 Add runtime test for %extend and nested union 2014-06-02 07:09:35 +01:00
William S Fulton
78719759d5 Test-suite makefile fixes for Windows
Remove $(realpath ) which is no good for Windows executables running
under Cygwin's make
2014-05-28 23:44:55 +01:00
William S Fulton
243671700f Fix li_boost_intrusive_ptr for various versions of boost
Modify testcase to fix compile errors on various versions of boost.
Tested using various combinations from boost-1.33/gcc-3.4.2 to
boost-1.53/gcc-4.7.3. Originally noticed as broken on
boost-1.36/gcc-4.3.4 on SLE 11.

Add in some diagnostics when reference count is wrong... which does
still happen occasionally.
2014-05-18 23:29:06 +01:00
William S Fulton
2f25b68d10 Merge branch 'kwwette-out-of-src'
* kwwette-out-of-src:
  Configured languages display improvement
  Fix out of source clean-android-examples
  Neaten up test-suite Makefile regeneration
  Remove duplicate test target in CCache Makefile
  Add in CPPFLAGS and LDFLAGS to examples/test-suite
  Remove unnecessary make invocation when running test-suite
  gitignore to ignore build directory names
  Partially fix R out of source test-suite
  Update all languages to use SCRIPTDIR
  Slight simplification of test-suite build for new out-of-source changes
  Allow examples and test-suite to be built out of source tree
  Add "make maintainer-clean" to Travis CI build
  CCache/Makefile.in: fix to allow out of source tree check/install
  Regenerate configured Makefile if Makefile.in or config.status have changed
  Fix segmentation fault in some Javascript examples
  configure.ac: print configured languages at end of configuration
2014-05-15 23:32:10 +01:00
William S Fulton
2b5499a262 Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override
only where needed.
2014-05-15 23:11:07 +01:00
Vadim Zeitlin
cd64ad2a71 Fix running Doxygen Java unit tests from separate build directory.
Use full path for CommentsParser.java instead of relying on it being found by
"find . -name *.java".

Also use tools.jar from the JDL for the Doxygen-specific tests only, the other
ones don't need it.
2014-05-15 00:29:44 +02:00
Vadim Zeitlin
6d0d6758e0 Fix Java-specific Doxygen unit tests.
Put these tests in DOXYGEN_TEST_CASES and not just CPP_TEST_CASES as the
"-doxygen" switch is only used for those in the former and not the latter.
2014-05-15 00:28:33 +02:00
William S Fulton
9b0e484b8a Tests for C nested classes symbol table not being in global space
Tests for 55bda53145
2014-05-12 07:51:55 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Vadim Zeitlin
c5e5978287 Merge with the master again.
Bring in the recent JavaScript changes.
2014-05-07 23:25:33 +02:00
Karl Wette
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00
Vadim Zeitlin
1ebd2334b8 Merge branch 'master' into doxygen
Merge with ~3.0.1 sources from master.
2014-04-30 18:37:57 +02:00
William S Fulton
50a9c5fbec Add C++11 constexpr runtime test 2014-03-31 19:29:19 +01:00
William S Fulton
15f4b3b19d Correct messages displayed when running Java test-suite 2014-03-28 07:48:40 +00:00
William S Fulton
87963d2e68 Java/C# smart pointer tests: Give GC more time to collect objects 2014-03-16 00:44:30 +00:00
William S Fulton
01ce992f5d C++11 result_of testcase 2014-03-14 01:57:16 +00:00
William S Fulton
09cfc53bdf Better error detection in some java testcases 2014-03-01 16:14:36 +00:00
Olly Betts
2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
William S Fulton
4f3c77051f Slight wording change when running test-suite
Should be easier to parse 'by eye'
2014-02-22 20:51:27 +00:00
William S Fulton
90a9d750c9 Add support for cdata library for Java 2014-02-15 22:13:50 +00:00
William S Fulton
2f47bb8d67 Typedef typedef prefix test for templates
As given in Diorcet Yann's example in issue #50
2014-01-14 07:20:06 +00:00
William S Fulton
07ce3fb746 Add testcase for %attributestring on shared_ptr 2014-01-11 19:34:22 +00:00
William S Fulton
c34d7f6d23 %naturalvar feature fixes and documentation
Fix and document the naturalvar feature override behaviour - the naturalvar
feature attached to a variable name has precedence over the naturalvar
feature attached to the variable's type. The overriding was not working
when turning the feature off on the variable's name.

Fix so that any use of the naturalvar feature will override the global
setting. Previously when set globally by -naturalvar or %module(naturalvar=1),
use of the naturalvar feature was not always honoured.
2014-01-11 19:32:43 +00:00
Vadim Zeitlin
ad02cb98e6 Relax Java preproc_line_file unit test to pass in a separate build directory.
Exact paths comparison doesn't work when SWIG is built in a directory
different from the source one, so check whether the path just ends with the
expected path components instead.

This allows all Java tests to pass in this build configuration.

closes #115
2013-12-23 20:42:48 +00:00
Vladimir Kalinin
b4fef06c42 fixed %template within %extend, test added
fixed language symbol table nested classes name separator, test added
fixed %feature "flatnested" working with %extend
fixed Swig_offset_string for empty string
added simple template to save/restore values in current scope (readability reasons)
2013-12-19 02:11:22 +04:00
Vladimir Kalinin
865408874f fixed %template declared within class, next to template declaration
added a few tests for C# nested classes support
2013-12-16 11:43:28 +04:00