Commit graph

5,335 commits

Author SHA1 Message Date
Olly Betts
2e7da86b2c php: Fix overloaded directed methods with non-void return
We were treating  such methods like constructors and assigning to the
internal _cPtr, which just seems bizarrely wrong.

Fixes #1900
2021-03-18 10:58:44 +13:00
Olly Betts
4e0997cd5a Conditionalise math.i for PHP
PHP already provides all the wrapped constants and all the wrapped
functions except fabs() (PHP provides abs() instead).  Rewrapping
the constants causes warnings or errors (depending on PHP version)
and the rewrapped functions seem to be hidden by the built-in
versions, so only wrap fabs() for PHP.

(Even a wrapper for fabs() seems of little use since abs() is already
provided, but really math.i seems of little use more generally since
any general purpose programming language will provide its own maths
functions and constants - the key motivation here is to eliminate
warnings and errors from running the testsuite.)
2021-03-17 09:43:15 +13:00
Olly Betts
6afc3e3504 Update PHP director_basic expected classes+funcs
Fixes warnings from test suite introduced in
c259702314.
2021-03-17 09:35:39 +13:00
William S Fulton
3f391478c4 Merge branch 'v8-context-aware-race-free-preparation'
* v8-context-aware-race-free-preparation:
  Lib/javascript/v8: use ::Cast instead of To* when possible.
  Lib/javascript/v8/javascriptrun.swg: clean up pre-processor conditions.
  Lib/javascript/jsc/javascriptinit.swg: shortcut JSGlobalContextRef casts.
  Examples/test-suite/grouping.i: resolve compiler warning.
2021-03-11 22:48:38 +00:00
William S Fulton
6aef217438 Add Javascript (JSC) support for type conversion
Fix types_directive testcase to ensure the %types code is actually
called and not just cast from one type to the other.
2021-03-11 20:18:58 +00:00
William S Fulton
9739be60d0 Add two Javascript testcases converted from Python 2021-03-11 20:10:18 +00:00
William S Fulton
04b46cc8a3 Javascript type conversion support
Add testcase for previous commit.
Add missing assert for future type conversions support that will use
the heap instead of pointer casts (for smart pointer type conversions).

Closes #1963
2021-03-11 20:10:13 +00:00
Andy Polyakov
3edccb615d Examples/test-suite/grouping.i: resolve compiler warning. 2021-03-10 14:48:18 +01:00
William S Fulton
227614056b Convert javascript_arrays.i example into testcase 2021-03-06 10:55:47 +00:00
William S Fulton
1a4dc82931
Merge branch 'master' into array_fix 2021-03-03 21:54:30 +00:00
William S Fulton
bff805dae5 Merge branch 'ignore-empty-doxygen-commands'
* ignore-empty-doxygen-commands:
  Fix incorrect warning "Unknown Doxygen command: ."
  Don't use invalid iterators in Doxygen command parsing code

Conflicts:
	CHANGES.current
2021-03-01 23:14:53 +00:00
William S Fulton
69f9509c2b Fix incorrect warning "Unknown Doxygen command: ." 2021-03-01 23:12:21 +00:00
William S Fulton
4b64becbbb OUTPUT typemaps on methods that don't return void
SWIGJSC_ValueIsArray could be implemented by JSValueIsArray in later
versions of Javascript webkit, similar fix to previous commits for v8.

Enhance testing of OUTPUT typemaps to test more than one output.
2021-03-01 14:20:18 +00:00
William S Fulton
1de4a3a8f6 Add Javascript test for missing new in constructor call
Testcase for issue #969 and issue #626
2021-02-28 22:01:32 +00:00
William S Fulton
769dc27bcd Javascript: Add runtime tests for typemaps.i
Tests fix in previous couple of commits.
2021-02-28 21:01:56 +00:00
William S Fulton
1d4ef62466 Node: Fix handling of large unsigned values
Closes #1269
2021-02-26 23:31:12 +00:00
William S Fulton
7b37c8cd02 Merge branch 'pr/new-node-fixes'
* pr/new-node-fixes:
  Travis testing: Node 12 support not fully working yet
  Revert "Merge pull request #3 from tungntpham/new-node-fixes-refactor"
  OPTIM: Restructured the code where it checks for V8 version, removing duplicate code and potentially improving the readability.
  Nodejs: run tests against Node.js v12
  Add support for Node.js v12
  Replace Handle with Local depending on Node.js version
  Introduce macros to support both Handle and Local types
2021-02-24 22:14:47 +00:00
William S Fulton
7d85efbf3c Lua example fix for newer osx 2021-02-20 14:47:03 +00:00
Zackery Spytz
bcfa927298 Fix typos in attribute2ref() in Lib/typemaps/attribute.swg
AccessorName was being used instead of AttributeName.

Closes #1872.
2021-02-09 09:21:14 -07:00
William S Fulton
bc09d05174 testname typo fix 2020-10-10 17:59:17 +01:00
William S Fulton
638ca8152d complex can now be used as an identifier
Remove final vestiges of 'complex' keyword.

Closes #252
2020-10-10 16:07:55 +01:00
William S Fulton
71a13e60de Quieten ccomplextest 2020-10-10 15:21:13 +01:00
William S Fulton
f318bb8286 Add missing clean targets
template_typedef_cplx2 files are generated by the template_typedef_import.multicpptest
but can also be cleaned by the template_typedef_cplx2.cpptest target.
2020-10-10 15:02:26 +01:00
William S Fulton
04e49b174b Further ccomplextest hacks
For visual c++ compilation when using creal and cimag.
2020-10-10 15:02:26 +01:00
William S Fulton
fd592fdc3b Split C complex.h from C++ complex testing 2020-10-10 15:01:29 +01:00
William S Fulton
2cbf7d725a Remove Remove runtime test for unsupported complex or _Complex by itself 2020-10-10 14:53:46 +01:00
William S Fulton
4f184500d7 Merge commit '8245277ad3' into c99-complex
* commit '8245277ad3':
  Remove test for unsupported complex or _Complex by itself
  More C99 complex fixes, plus Python tests
  Restore _Complex as standalone type
  Small corrections for handling C99 _Complex
  Properly handle C99 complex types even in C++ mode

Conflicts:
	Examples/test-suite/python/complextest_runme.py
2020-10-10 14:53:33 +01:00
William S Fulton
b456449940 Update python_pybuffer_runme.py syntax for working under both python 2 and 3 2020-10-07 22:41:04 +01:00
William S Fulton
4d5f4bcd33 Merge branch 'PyBuffer_Release-pybuffer'
* PyBuffer_Release-pybuffer:
  Add tests.
  Fix the error handling for the PyObject_GetBuffer() calls in pybuffer.i
2020-10-07 22:37:17 +01:00
William S Fulton
fe676f840a Merge branch 'director-return-const-pointer'
* director-return-const-pointer:
  Put test in alphabetical order
  Perform proper spacing in director method declarations
2020-10-07 22:26:25 +01:00
William S Fulton
339377410b Put test in alphabetical order 2020-10-07 22:21:37 +01:00
William S Fulton
61ea3c05de Add missing virtual destructor to testcase 2020-09-28 09:57:51 +01:00
William S Fulton
c1b004f4fa Add access modifier support for interface feature
Add ability to change the modifiers for the C# and Java
interface generated when using the %interface macros.

For C# use the 'csinterfacemodifiers' typemap.
For Java use the 'javainterfacemodifiers' typemap.

For example:

  %typemap(csinterfacemodifiers) X "internal interface"

Closes #1874
2020-09-25 18:54:25 +01:00
William S Fulton
71d4822860 Add Ruby test for wchar_t members in li_std_string testcase 2020-09-24 22:36:32 +01:00
Gareth Francis
33765e5025 Extend C# wchar_t member test to pass unicode strings 2020-09-12 17:19:15 +01:00
Gareth Francis
6db3ab0d05 Add test for wchar_t members to li_std_string.i 2020-09-12 17:04:28 +01:00
Karl Wette
251ab662bf Octave: error() must be called with an argument 2020-08-27 17:19:13 +10:00
William S Fulton
b1c0145fd3 Python 3.2 syntax error fixes in tests 2020-08-15 23:51:40 +01:00
William S Fulton
c5e078c437 Revert 2to3 modification
Use sys.maxint still for Python 2
2020-08-15 23:50:31 +01:00
William S Fulton
baec830f75 Merge branch 'remove-dependency-on-2to3'
* remove-dependency-on-2to3:
  Remove need for Python 2to3
  Modify examples to be both Python 2 and 3 compatible
  Remove python3 specific runme3.py test files
  Convert python tests using 2to3
  Convert python test scripts to be Python 2 and 3 compatible
  Convert swigobject python test to be python 2 and 3 compatible
  Convert two tests to work with both Python 2 and 3
  Improve director_exception Python test
  Remove further print statements from Python tests
  Improve Python testing catching exceptions
  Improve contract Python testcase testing
  Remove print statements from Python tests
2020-08-15 19:03:38 +01:00
William S Fulton
cc94e5168f Add missing test to python test-suite 2020-08-15 19:02:52 +01:00
William S Fulton
ec2b47ef2a Remove need for Python 2to3
All Python examples and tests have been written to be both Python 2 and Python 3
compatible, removing the need for 2to3 to run the examples or test-suite.

The 2to3 executable is not always available and even when available does not
always work, e.g. with pyenv. An alternative would be to use the lib2to3 Python
module instead, but this isn't available in some older versions of Python 3.

I had this problem on Ubuntu Bionic on Travis:

  checking Examples/python/callback
  pyenv: 2to3-3.8: command not found
  The `2to3-3.8' command exists in these Python versions:
    3.8
    3.8.1

Reference issues:
  https://github.com/pypa/virtualenv/issues/1399
  https://travis-ci.community/t/2to3-command-not-found-in-venv-in-bionic/4495
2020-08-15 18:04:58 +01:00
William S Fulton
89bee6a7fa Modify examples to be both Python 2 and 3 compatible
For removing dependency on 2to3
2020-08-15 16:46:01 +01:00
William S Fulton
bc7a067587 Remove Examples/contract
This set of examples was never tested/documented
There is an equivalent testcase in Examples/test-suite/contract.i
2020-08-15 12:26:21 +01:00
William S Fulton
2af35cb4ff Remove python3 specific runme3.py test files
This file can be run using Python 2, the test is just ignored
2020-08-15 12:20:23 +01:00
William S Fulton
d4ffa46f41 Convert python tests using 2to3
These tests were converted using 2to3 and should be valid using
Python 2.7 and Python 3+.
2020-08-15 00:16:04 +01:00
William S Fulton
66df0bd224 Convert python test scripts to be Python 2 and 3 compatible
Unicode testing
2020-08-15 00:09:31 +01:00
William S Fulton
36bb54f01d Convert swigobject python test to be python 2 and 3 compatible 2020-08-14 23:27:35 +01:00
William S Fulton
982b08dced Convert two tests to work with both Python 2 and 3
Now these two tests work without having to use 2to3
2020-08-13 23:34:28 +01:00
William S Fulton
d820045336 Improve director_exception Python test
Add code to handle missed exceptons.
Remove print statement.
2020-08-13 22:00:01 +01:00