Commit graph

97 commits

Author SHA1 Message Date
William S Fulton
6910e5f09c Merge branch 'shared-ptr-template-upcast'
* 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
2020-01-17 18:45:30 +00:00
Vadim Zeitlin
b52af40398 Disable Doxygen tests when using Java 8 or older
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.
2019-12-18 16:24:28 +01:00
Vadim Zeitlin
66a7826192 Rewrite Doxygen unit tests for Java using Java 9 API
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).
2019-12-18 02:45:06 +01:00
etse
24f974bb0c 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 2019-05-06 15:30:54 -04:00
William S Fulton
82d1632071 Combine duplicate unordered_set unordered_map testcases
Merge cpp11_li_std_unordered_map into cpp11_std_unordered_map
Merge cpp11_li_std_unordered_set into cpp11_std_unordered_set
2019-02-12 06:48:13 +00:00
Brad Kotsopoulos
b1697d7772 Move unordered containers under cpp11_ prefix 2018-11-28 16:51:53 -05:00
Brad Kotsopoulos
4fe9406fae
Add test cases to C++11 list 2018-11-24 10:00:23 -05:00
Brad Kotsopoulos
0f18b430fb Add unordered_{set|map} and set to Java
Add test suite

Add to makefile

Revert set change

Fix java map test

Fix some of the tests

Fix unordered map test
2018-11-23 14:35:35 -05:00
William S Fulton
99f8e12d32 Java director typemaps.i testing for pointers added
Copy java_director_typemaps testcase to test pointers instead of references.
2018-08-11 17:11:24 +01:00
William S Fulton
cf3ff89433 Fix doxygen testing for jdk < 9 2018-06-11 23:40:58 +01:00
William S Fulton
a539d9e1e5 Remove some debugging in java Makefile 2018-06-09 00:49:56 +01:00
William S Fulton
b0a42e38e7 Revert "JAVA_HOME nad tools.jar not needed for Java testing"
This reverts commit 7373b99079.

Seems to be needed for older jdks - needs some more work, as the
classpath used is not correct for jdk9.
2018-06-09 00:40:26 +01:00
William S Fulton
7373b99079 JAVA_HOME nad tools.jar not needed for Java testing
tools.jar doesn't seem to be needed (in jdk9 anyway), so removing it.
2018-06-08 19:12:39 +01:00
William S Fulton
4e27fdbfc1 Fix java test-suite parallel build (doxygen test cases)
CommentParser.class was being generated and read from multiple threads
Compile it just once using make dependencies.
2018-06-08 08:40:07 +01:00
William S Fulton
cbaf6eb2b3 Clean up merge problem 2018-05-25 07:56:45 +01:00
William S Fulton
0cfd53cff7 Merge branch 'master' into vadz-doxygen
* master:
  Add Octave 4.4 to Travis allow_failures
  Fixes for appveyor image changes
  Javascript test-suite Makefile parallel jobs
  Add changes entry for csconstruct, dconstruct and javaconstruct fix
  Fix lookup of csconstruct, dconstructor and javaconstruct typemaps
  Javascript %nspace fix in generated C++ code
  Add C++17 documentation chapter
  Add changes notes for C++17 nested namespaces support
  Test for invalid C++17 nested namespace aliases
  Test c++17 nested namespaces and %nspace
  Add c++17 nested namespaces runtime test for C#
  Add c++17 nested namespaces runtime test for Python
  Add support for c++17 nested namespaces
  Update CHANGES.current
  .travis.yml: test against Octave 4.4
  Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree'
  Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4
  Examples/octave/module_load/runme.m: do not use duplicate function names
  Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests
  Lib/octave: fix getting/setting global variables for Octave >= 4.4
  Lib/octave: use new class for function member dereference with Octave >= 4.4
  Lib/octave: fix operator installation for Octave >= 4.4
  Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass
  Lib/octave: fix call to mlock() for Octave >= 4.4
  Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4
  Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4
  Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4
  Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4
  Lib/octave: replace is_cell() with iscell() for Octave >= 4.4
  Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4
  Lib/octave: fix function name passed to unwind_protect::begin_frame()
  C#, D, Java methodmodifiers on destructors
  Javascript assert.h - move to header section
  Appveyor cl compiler warning fixes during configure
  Java vector wrappers cast correction
  test-suite fixes (Java directors) for compilers that don't support varargs
  Go - use director.swg like other languages
  test-suite fixes (2) for compilers that don't support varargs
  Consistent spacing in generated exception specifications
  test-suite fixes for compilers that don't support vararg macros
  Enhance Travis testing to use gcc 8 and test C++17 and C17
  Enhance SWIG_isfinite for older standards: C++03/C++98/C89
  test-suite support for gcc-8 targeting C++11 and C++14
  Scilab portability fixes - remove use of strdup
  Scilab array overbounds fix handling char type exceptions
  test-suite fix for c++17 and throw macro
  Remove use of 'register' in C source
  test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C
  Examples update to support C++17: exception specification throw removal
  Cosmetic syntax tweak using throw in Octave directors
  test-suite support for C++17 (Java): exception specification throw removal
  test-suite support for C++17: exception specification throw removal
  __cplusplus macro usage tweak
  Improve detection of Python's 2to3 tool
  Correct C shared library creation when specifing CC to configure
  Remove superfluous parens in generated Python scripts.
  [ci] guile 2.2 build no longer expected to fail
  guile - resstructure some configure tests
  Disable guile configuration if guile-config and guile report a different version
  Fix guile executable detection on early 2.0.x guile versions
  guile - drop GDB_INTERFACE related stuff
  guile - replace obsolete scm_listify with scm_list_n
  guile - use more reliable method of finding guile executable based on guile-config
  Fix go version matching in configure for go1.10
  [Python] Suppress new pycodestyle warning
  Add if-no-present action for jsv8inc arg
  Fix typo in help --with-jscoreinc and --with-jscorelib
  Fix off-by-one error
  * Makefile.in (configfiles): Update URLs for latest configfiles.
  Add changes entry for Ruby %alias fix for global functions
  [Ruby] Pass Qnil instead of NULL to rb_funcall()
  Fix typo
  Fix ruby %alias directive for native c functions
  Stop testing Python on Appveyor msys/mingw
  Fix -Wimplicit-fallthrough gcc-7.3 warning
2018-05-17 19:57:02 +01:00
William S Fulton
220247c130 Test c++17 nested namespaces and %nspace 2018-05-14 21:03:31 +01:00
Vadim Zeitlin
b7f78dd5a7 Merge branch 'master' into doxygen 2018-03-19 21:54:46 +01:00
William S Fulton
ed4b84f4d3 Fix overloading of shared_ptr method overloading
Add 'equivalent' attribute to typecheck typemap.
Closes #1098.
2017-09-23 15:19:34 +01:00
William S Fulton
f5e1856650 Expand std::shared_ptr testing to C# D Java Python 2017-09-22 20:03:47 +01:00
Vadim Zeitlin
db65ae5aea Merge branch 'master' into doxygen
Fix the usual conflicts in autodoc unit test due to fixing the
divergences in autodoc generation between builtin and default cases in
this branch.
2017-09-19 14:02:53 +02:00
Alan Woodland
4db1300622 Merge branch 'master' into javalist 2017-06-05 21:55:12 +01:00
Vadim Zeitlin
294ab27b90 Merge branch 'master' into doxygen
Merge 3.0.12 release changes from master.
2017-02-01 02:21:35 +01:00
Vadim Zeitlin
04a5215665 Fix using com.sun.tools.javadoc package under macOS
Export JAVA_HOME found by configure, so that the Java test suite makefile
could find this package under this directory.
2016-12-13 16:08:17 +01:00
Vadim Zeitlin
e668c47b70 Merge branch 'master' into doxygen
The way Python docstrings are indented has changed on master, so use the
standard inspect module in Python autodoc unit test to ignore the differences
in their indentation level between -builtin and non-builtin cases to make the
test still pass with the branch version, which avoids the use of different
(but almost identical) values in the test itself.
2016-12-12 01:24:17 +01:00
Andrey Starodubtsev
b2bcf040c0 java directorargout + java/typemaps.i fixes
- directorargout didn't work - it used string "jresult" instead of
  argument name
- java/typemaps.i didn't work with directors
- test for using java/typemaps.i in directors added
2016-06-08 15:04:47 +03:00
Alan Woodland
a3821245eb Added li_std_list to the Java test-suit makefile 2016-05-31 14:49:02 +01:00
William S Fulton
57f1c378b2 Remove JNI checks due to numerous spurious warnings in some versions of jdk-1.8
Was happening with openjdk-1.9 on Ubuntu 16.04 Xenial Xerus and also seen in jdk-1.8 on Fedora 23 (jdk-1.8.0_65-b17)
2016-05-01 17:35:55 +01:00
William S Fulton
50fec04759 Support namespaces and nspace with the interface feature for Java 2016-02-26 18:17:14 +00:00
William S Fulton
212300c62b interfaces branch merge fixes 2016-02-11 20:21:25 +00:00
William S Fulton
abccc13a4a Merge branch 'interfaces' into interfaces2
* interfaces:
  Remove unnecessary interfaces for concrete classes
  cosmetic code formatting changes
  Correct interface name attributes that are internal
  interface macro changes to support templates
  Test non-virtual method in Derived classes
  interface tests for a most derived class inheriting the interfaces further up the chain
  Rename GetCPtr/getCPtr to SWIGInterfaceUpcast
  interface feature support for const ref pointers (used by the STL)
  Interface feature support for arrays
  More interface feature testing for return values
  interface feature support for passing by value
  interface feature support for references
  Multiple inheritance parameters as pointers testing
  Simplify multiple_inheritance_abstract Java runtime test
  Warning fixes
  Rename test functions in multiple_inheritance_abstract testcase
  Formatting fixes in generated code for interface feature
  Cosmetic spacing changes in test case
  interface feature typemap corrections to handle NULL pointers
  interface test added
  javadirectorin fix
  interface implementation visibility
  interface inheritance (2)
  interface inheritance (1)
  feature:interface ported to Java
  propagate non-abstract "interface" base methods (3)
  propagate non-abstract "interface" base methods (2)
  propagate non-abstract "interface" base methods (1)
  namespace support added GetCPtr now returns HandleRef "feature:interface:name" is now mandatory attribute
  interfaces (1)
  interfaces (1)

Conflicts:
	Source/Modules/csharp.cxx
	Source/Modules/java.cxx
2016-02-11 19:37:31 +00:00
Vadim Zeitlin
658f92a993 Use correct separator in Java class path under Windows.
A semicolon must be used there and not a colon as under Unix.
2015-07-28 00:05:55 +02:00
Lindley French
94f683868a Enable variable and typemap substitution in typemap kwargs, and a test that verifies this works for directorin:descriptor. 2015-07-22 11:31:21 -07:00
Vadim Zeitlin
b908a9b430 Quote JAVA_HOME variable value in Java test suite makefile.
This should fix problem with JAVA_HOME containing spaces, as it happens in
the AppVeyor build.
2015-07-20 15:43:23 +02:00
Vadim Zeitlin
9b857e6cf1 Merge latest master into doxygen branch. 2014-12-15 02:55:26 +01:00
William S Fulton
0664ecdeb7 Fix strongly typed enums for Java when using simple enum wrappers 2014-11-24 07:04:54 +00: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
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
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
15f4b3b19d Correct messages displayed when running Java test-suite 2014-03-28 07:48:40 +00: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
baec61c5ab java_director_exception_feature_nspace test case changes
- The implementation for SEP for the classpath is not portable, eg the
separator should be ':' not ';' on Cygwin, but clearly it could be ';'
if using a native Windows version of Java. In the past the test-suite
has been constructed to avoid this problem and these changes go back to
this approach at the expense of not testing nspace without -package (but
not specifying -package is quite unusual when using nspace, so no great
loss). This test could be restored to how it was if the separator is
detected at configure time from the JVM itself, eg by calling Java code:

  System.out.println(System.getProperty("path.separator"));

- Mangle the non-public classes in the _runme.java file so that they are
unique to this testcase (the .class files generated can interfere with
other tests).

- Const corrections and spelling mistakes fixed in test case.

test case improvements
2013-11-07 22:50:08 +00:00
Marvin Greenberg
6736e74127 Add feature director:except for improved director exception handling in Java
Closes #91
2013-10-22 20:44:35 +01:00
Vladimir Kalinin
766d55255b feature:interface ported to Java 2013-05-21 20:05:54 +04:00
William S Fulton
6fafa8cecc Merge pull request #17 from tristan0x/fix-test-suite-if-custom-java
use executables path set at ./configure time
2013-01-18 17:13:16 -08:00