Commit graph

5,646 commits

Author SHA1 Message Date
William S Fulton
15d69ec270 Add runme.class file to Java test-suite clean 2022-05-07 08:17:48 +01:00
William S Fulton
fd846be18b Remove some usage of strdup
To fix visual c++ warning:
  warning C4996: 'strdup': The POSIX name for this item is deprecated.
2022-05-07 07:09:44 +01:00
William S Fulton
f029beffe8 Ruby li_std_set test failure workaround
Prevent GC from collecting "hello" string in testcase
as workaround to prevent GC occasionally causing segfault.

Issue #2115
2022-05-06 08:11:29 +01:00
William S Fulton
bb39235c9c Add C# wchar_t * director typemaps
More Python std::wstring directors Python testing
2022-05-04 21:37:47 +01:00
William S Fulton
751d443046 C# std::wstring director support
Updates for #1706
2022-05-04 21:37:47 +01:00
tartanpaint
9fd59650cf Apply C# test updates for directors with std::wstring supplied by wsfulton 2022-05-04 21:37:47 +01:00
William S Fulton
79a9389355 Add support for throwing wstring exceptions
Throw an ApplicationException for std::wstring and wchar_t * strings
2022-05-02 21:08:19 +01:00
William S Fulton
ed42422d1c Add support for wchar_t * and std::wstring Unicode strings on Linux
Initial contributions for Linux provided in issue #1233, modified to work
on both Windows and Linux. Dual support is possible by detecting
the sizeof wchar_t which is different on each of these systems.
2022-05-02 21:08:19 +01:00
Corey Minyard
3cc67d42f3 [Go] Add a test for godirectorin with const char **
This exercises a bug that was found with this fairly complex mapping, it
wasn't putting newlines in the proper place.  A previous commit added
the newlines, this makes sure it doesn't happen again.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
2022-04-18 19:55:34 -05:00
Corey Minyard
546763ffbc [Go] Add an example for goin and godirectorin
Shows how to use a go directory for passing an NULL terminated argv type
array.

This also exercises the bug in the previous commit.  That's why the
call1 function isn't assigned to zero, that the only case where that bug
happens.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
2022-04-18 19:55:34 -05:00
luz paz
c8bec18554 Fix various typos
Found via `codespell -q 3 -L ans,anumber,ba,bae,chello,clos,cmo,coo,dout,fo,funktion,goin,inout,methid,nd,nin,nnumber,object,objekt,od,ois,packag,parm,parms,pres,statics,strack,struc,tempdate,te,thru,uint,upto,writen`
2022-04-11 07:59:36 +12:00
Olly Betts
1aeaa2a644 Recognise and ignore Doxygen group commands @{ and @}
Fixes #1750
2022-04-07 12:05:54 +12:00
William S Fulton
da07af7fe2 doxygen_autodoc_docstring test fix for Python builtin 2022-04-06 22:33:17 +01:00
William S Fulton
19a872eab7 Temporarily disable doxygen_autodoc_docstring_runme.py 2022-04-06 20:51:37 +01:00
William S Fulton
b35ebc81a9 Doxygen comments take precedence over the autodoc feature.
If a "docstring" feature is present it will still override a Doxygen comment.
If the "autodoc" feature is also present, the combined "autodoc" and "docstring"
will override the Doxygen comment. If no "docstring" is present then the
"autodoc" feature will not be generated when there is a Doxygen comment.

This way the "autodoc" feature can be specified and used to provide documentation
for 'missing' Doxygen comments.

Closes #1635
2022-04-06 08:08:14 +01:00
William S Fulton
e8c1bda0b5 D compiler detection enhancements
Detect LLVM D compiler ldmd2 or ldc2.
Show D version. Note that dmd does not have an
explicit command line option to show version.
2022-04-04 22:02:05 +01:00
William S Fulton
322574722b Testcase warning fix for c# old versions of MSVC 2022-04-04 22:02:05 +01:00
William S Fulton
0b15740663 Fix warning in D test-suite 2022-03-28 19:30:47 +01:00
William S Fulton
5cc4591ae7 Consistent cpp11 testing in test-suite
Move HAVE_CXX11 into makefiles so that running test-suite
from top level directory or in the language's test-suite directory
is consistent. For example, running 'make check-java-test-suite'
behaves the same as 'cd Examples/test-suite/java && make check'.
2022-03-27 19:34:20 +01:00
William S Fulton
27d6f5c2fe git commit -m "Fix test-suite's make clean to clean cpp11 testcases
Always clean cpp11 tests even if --enable-cpp11-testing is not active
May result in cpp11 tests being deleted twice though" ../
2022-03-27 18:28:49 +01:00
William S Fulton
cbd9bd6d71 Fix running make-cpp11 for ocaml 2022-03-27 16:43:30 +01:00
William S Fulton
282fdb1715 MzScheme 'passes' with c++11 testing now
Test c++17 on Github Actions to try keep it passing when
configure detects g++ can test c++17.
2022-03-27 15:06:47 +01:00
William S Fulton
f44153069b Ocaml test-suite 'passes' with c++11 testing now
Test c++17 on Github Actions to try keep it passing when
configure detects g++ can test c++17.
2022-03-27 13:50:30 +01:00
William S Fulton
a71c318b06 Stop testing two recently failing ocaml tests
Problem here seems to be one also affecting other ocaml broken tests:
1. Enum value names should be using sym:name not name (ie %rename is broken for ocaml enum items)
2. directorin typemaps are not correct
2022-03-27 13:33:02 +01:00
William S Fulton
ffe2f85417 go_multicpp_setup make function correction 2022-03-27 12:44:19 +01:00
William S Fulton
c5f209706e Further makefile refactoring for multicpptests 2022-03-27 11:27:58 +01:00
William S Fulton
d1b93f2c0e Merge branch 'feature/python-builtin-separate-runtime-data'
* feature/python-builtin-separate-runtime-data:
  Rework swig_and_compile_multi_cpp makefile helper
  Different capsule names for builtin changes entry
  Use different capsule names with and without -builtin

Conflicts:
	CHANGES.current
2022-03-26 15:18:55 +00:00
William S Fulton
f2dd436a5b Rework swig_and_compile_multi_cpp makefile helper
Seems less cryptic and more maintainable to me
2022-03-26 15:16:22 +00:00
William S Fulton
3ab288dfa4 Different capsule names for builtin changes entry 2022-03-26 15:06:13 +00:00
William S Fulton
5c68705a21 Comment broken part of using_member.i 2022-03-26 12:03:09 +00:00
William S Fulton
469f694ae6 Fix using declaration in derived class bugs
Problem when all the base class's overloaded methods were
overridden in the derived class - fixes "multiply defined" errors.

Linked lists of the overloaded methods were not set up correctly
when handling the using declaration.

Closes #2244
2022-03-24 20:52:58 +00:00
William S Fulton
a343b7e254 Remove -py3 command line option
Closes #1779
2022-03-23 18:13:07 +00:00
William S Fulton
f068f2c2d6 Add Python < 3.3 support for pyabc.i
pyabc.i for abstract base classes now supports versions of Python
prior to 3.3 by using the collection module for these older versions.
Python-3.3 and later continue to use the collections.abc module.
The -py3 option no longer has any effect on the %pythonabc feature.
2022-03-23 07:58:01 +00:00
William S Fulton
9fd2356104 Merge branch 'flatstaticmember'
* flatstaticmember:
  Test -flatstaticmethod and %extend
  Python -flatstaticmethod corrections
  Enable flat static constructor methods
  Move low level static methods
  Use flat static method if it's a "friend"
  Python: Option to generate flat class methods
2022-03-21 19:28:52 +00:00
William S Fulton
2c6e7f99a6 Test -flatstaticmethod and %extend 2022-03-21 19:23:15 +00:00
Ian Lance Taylor
90aa3f75ba [Go] Implement %extend base methods in child classes.
Fixes #337
2022-03-18 18:34:28 -07:00
Olly Betts
9ab3ef8e96 Update testcase comment 2022-03-19 08:55:39 +13:00
Olly Betts
d7e83c1cbc Fix checking of "optimal" typemap attribute
Previously SWIG checked that the typemap action contained ";\n" not
followed by an identifier character, and that it contained no other
`;`, but that incorrectly allows some cases it shouldn't.

Instead check that the action ends with `;\n` and contains no other
`;`, which is simpler and correctly rejects these cases.
2022-03-19 08:13:09 +13:00
Eugene Toder
f733efd3c0 Use different capsule names with and without -builtin
Types generated with and without -builtin are not compatible. Mixing
them in a common type list leads to crashes. Avoid this by using
different capsule names: "type_pointer_capsule" without -builtin and
"type_pointer_capsule_builtin" with.

See #1684
2022-03-18 13:44:54 -04:00
Jim Easterbrook
3cfc26bc30 Move low level static methods
Like the non-static methods these are no longer present when using
-builtin
2022-03-18 11:10:14 +01:00
Julien Schueller
484e5316f2 Python: Option to generate flat class methods 2022-03-18 11:10:14 +01:00
William S Fulton
06364ae749 Merge remote-tracking branch 'wsfulton/appveyor-vs2022'
* wsfulton/appveyor-vs2022:
  Cygwin testing - test python3 (3.9) instead of python-2.7
  Last resort to use /usr/lib in python linking
  mingw - install python from pacman
  Fix detection of python .lib file for 2 digits in minor version
  cpp11_result_of testcase and result_of deprecation in c++17
  Testcase correction for using declaration and members
  Fix compiler warning using Java std::wstring
  Appveyor changes to use Visual Studio 2022 image
2022-03-17 08:23:13 +00:00
Olly Betts
c7af8eabb3 Default to running tests with Python 3
Specify PY2=1 to use Python 2.

See #1779
Closes #2235
2022-03-17 18:55:10 +13:00
William S Fulton
a9a110fbae cpp11_result_of testcase and result_of deprecation in c++17
Avoid deprecations warnings using c++17 and later compiler.
Keep testing using c++11 and c++14 compilers.
Provide simple alternative to keep run time tests working with
c++17 and later compilers.
2022-03-16 22:42:27 +00:00
William S Fulton
7f97278739 Testcase correction for using declaration and members
The compiler calls setWindowGrab(bool) instead of setWindowsGrab(NativeWindowType*)
and gives a warning with Visual C++ when calling setWindowGrab(true)
with a pointer to ApplicationContextSDL.
Looks like function function hiding of the non-virtual method.
I can't see this changing testing of the original bug.
2022-03-16 22:42:27 +00:00
Ian Lance Taylor
0c0b93f8e0 [Go] add typemaps for std::string*
Fixes #2214
2022-03-15 20:30:53 -07:00
Ian Lance Taylor
b819363117 [Go] Don't convert arrays to pointers if there is a "gotype" typemap entry.
Fixes #749
2022-03-15 12:18:47 -07:00
William S Fulton
ae8aa4e08f Re-enable overloading test for php8 2022-03-15 08:32:27 +00:00
Olly Betts
936e9264e8 Adjust Python variables example for Python 2
Explicitly call str() as previously Python 2 seemed to end up calling
repr().
2022-03-15 18:11:34 +13:00
Olly Betts
250afd6dc3 List variables in variables example
Seems useful in itself, but also serves to check if
https://sourceforge.net/p/swig/bugs/976/ is still reproducible.
2022-03-15 11:06:20 +13:00