Commit graph

5,050 commits

Author SHA1 Message Date
Zackery Spytz
a159a252dd [OCaml] Fix the dynamic_cast test
Add out typemaps for SWIGTYPE *DYNAMIC and SWIGTYPE &DYNAMIC.

Add dynamic_cast_runme.ml.
2019-02-14 02:21:36 -07:00
Olly Betts
9db02a1e6b Update PHP testsuite for vadz's new cars 2019-02-12 10:27:31 +13:00
William S Fulton
be84fc62a9 Merge branch 'ZackerySpytz-cpp14-binary-integer-literals'
* ZackerySpytz-cpp14-binary-integer-literals:
  Add support for C++14 binary integer literals
2019-02-11 18:36:47 +00:00
William S Fulton
ad7f9cd8d7 Mark and setup OCaml as an experimental target language.
Issue #1437
2019-02-11 18:30:35 +00:00
Vadim Zeitlin
ddf4bbe112 Merge branch 'fix-ignore-param'
Fix for wrongly renaming parameters to "$ignore" in Python.

See https://github.com/swig/swig/pull/1462
2019-02-11 14:24:46 +01:00
Zackery Spytz
23d83cd9c1 Add support for C++14 binary integer literals
Closes #1030.
2019-02-10 15:38:49 -07:00
William S Fulton
80b79fc583 Merge branch 'ZackerySpytz-cpp11_u_U_char_encoding_prefixes'
* ZackerySpytz-cpp11_u_U_char_encoding_prefixes:
  Document C++11 UCS-2 UCS-4 and C++17 UTF8 character literals support
  c++17 u8 character literals testcase
  C++17 u8 character literals fix
  C++17 u8 character literals testcase
  Fix the Java tests
  Add support for the C++11 u and U encoding prefixes for char literals
2019-02-10 17:39:03 +00:00
William S Fulton
21c0d59ae2 c++17 u8 character literals testcase 2019-02-10 16:45:03 +00:00
Zackery Spytz
e4759ae250 C++17 u8 character literals testcase
Issue #1450
2019-02-10 15:53:42 +00:00
Vadim Zeitlin
2517f5b05e Don't apply %ignore to parameters
Fix regression introduced by 3f5c17824c
which resulted in using "$ignore" instead of the real parameter name in
Python if an %ignore/%rename($ignore) for the parameter name was used
(as could happen not necessarily intentionally when using wild card
ignores with regex matches) by explicitly checking if we're dealing with
a parameter node in apply_rename(), used by Swig_name_make(), and not
renaming it to "$ignore" in this case.

Extend the test suite to check for this case.

Closes #1460.
2019-02-10 13:40:12 +01:00
Vadim Zeitlin
509b14ac6f Add Python run-time test for ignore_parameter.i
This will allow to test the upcoming fix for wrongly handling "%ignore"
for parameters in the test suite.
2019-02-10 13:31:54 +01:00
William S Fulton
424eebfb6a Disable broken mzscheme testcases
Failing tests due to:
-Werror=overflow
-Werror=write-strings
2019-02-10 10:46:26 +00:00
William S Fulton
e5a3c1e28c MzScheme and Travis CXXFLAGS/CFLAGS support
mzc seems to use the CFLAGS, but not the CXXFLAGS env variables.
Pass the CXXFLAGS as ++ccf options when compiling c++.
2019-02-10 10:35:27 +00:00
William S Fulton
a8f927dd50 Merge branch 'mzscheme-experimental'
* mzscheme-experimental:
  Fix mzscheme name and unions testcases
  Terminology correction in html docs
  Suppress experimental language warning when running the test-suite
  Mark MzScheme as an experimental language
  Add mzscheme to Travis testing
  Format mzscheme help output
  Mzscheme out of source examples fixes
  Standardise Mzscheme simple example
  Standardise Guile simple example
  Fix mzscheme static variable wrappers
  MzScheme missing destructor added in, std_vector example fixed
  Fix mzscheme simple example
  Fix mzscheme multimap example
  Skip failing MzScheme tests
2019-02-10 00:50:35 +00:00
William S Fulton
ed45d2835f Merge branch 'swig-fortran-fix-anonymous-apply-template'
* swig-fortran-fix-anonymous-apply-template:
  Fix failure of %apply directive in anonymous templates
  Add test showing typemap failure
2019-02-10 00:41:58 +00:00
William S Fulton
9ab873f432 Merge branch 'ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn'
* ZackerySpytz-OCaml-classDirectorMethod-CAMLreturn:
  [OCaml] Fix possible GC issues in generated director code

 Conflicts:
	Examples/test-suite/ocaml/director_unroll_runme.ml
2019-02-09 22:54:43 +00:00
William S Fulton
6ec798f7ff Merge branch 'ZackerySpytz-OCaml-exception-improvements'
* ZackerySpytz-OCaml-exception-improvements:
  [OCaml] Some exception improvements
2019-02-09 22:35:48 +00:00
William S Fulton
5c66ed3d0b Merge branch 'ZackerySpytz-OCaml-fix-typedef_mptr'
* ZackerySpytz-OCaml-fix-typedef_mptr:
  [OCaml] Fix and re-enable typedef_mptr_runme.ml
2019-02-09 22:29:18 +00:00
William S Fulton
d7bb500315 Merge branch 'ZackerySpytz-OCaml-director-ctors'
* ZackerySpytz-OCaml-director-ctors:
  [OCaml] Fix a bug in the ctors of director classes
2019-02-09 22:28:10 +00:00
William S Fulton
b80b4d5638 Merge branch 'ZackerySpytz-OCaml-director_pass_by_value'
* ZackerySpytz-OCaml-director_pass_by_value:
  [OCaml] Fix director_pass_by_value
  [OCaml] Reduce the duplication in typemaps.i
2019-02-09 22:25:29 +00:00
William S Fulton
827035d9ce Merge branch 'ZackerySpytz-OCaml-default_arg_values-inherit_missing-runtime-tests'
* ZackerySpytz-OCaml-default_arg_values-inherit_missing-runtime-tests:
  [OCaml] Runtime tests for default_arg_values, inherit_missing and some others
2019-02-09 22:09:24 +00:00
William S Fulton
454c1f1aa4 Fix mzscheme name and unions testcases 2019-02-09 20:32:39 +00:00
William S Fulton
c06dba6b58 Suppress experimental language warning when running the test-suite 2019-02-09 20:32:06 +00:00
William S Fulton
4bb0b974c0 Mzscheme out of source examples fixes 2019-02-09 17:14:46 +00:00
William S Fulton
30d0c16ac0 Standardise Mzscheme simple example
Changes so that it works the same as other language modules
2019-02-09 14:44:33 +00:00
William S Fulton
de23343739 Standardise Guile simple example
Changes so that it works the same as other language modules
2019-02-09 14:44:33 +00:00
William S Fulton
20344093ef Fix mzscheme static variable wrappers
$argnum needs to be expanded in the 'varin' typemap which shares
code used by the 'in' typemap.
Setting the static variable is also a function call (argnum=1).

Added class examples - needs static variables to work
Test newly working test cases with this fix
2019-02-09 14:44:33 +00:00
William S Fulton
b21a28f26a MzScheme missing destructor added in, std_vector example fixed 2019-02-09 14:44:33 +00:00
William S Fulton
f6da155fda Fix mzscheme simple example 2019-02-09 14:44:33 +00:00
William S Fulton
80e9034425 Fix mzscheme multimap example 2019-02-09 14:44:33 +00:00
William S Fulton
43bdffcbc1 Skip failing MzScheme tests 2019-02-09 14:44:33 +00:00
Olly Betts
6833bb7e0f [PHP] Make the testsuite fail on any PHP diagnostic 2019-02-09 12:52:25 +13:00
Olly Betts
785481cc62 Fix PHP testsuite check::get() helper
This was trying to return a reference, but that doesn't actually work
for all the things it's used for, and none of the uses require the
return value to be a reference.
2019-02-09 11:45:57 +13:00
Olly Betts
cf785d7071 Avoid uses of undeclared variables in PHP testsuite 2019-02-09 11:45:29 +13:00
Olly Betts
aa7eb05071 Disable broken 'this' check in director_unroll_runme.php
This was comparing an unset property on two objects matched - they
do, but the check we actually intend here is that they wrap the same C++
object.  We don't seem to be able to accomplish the desired check for
PHP, so just disable this for now.
2019-02-09 11:43:49 +13:00
Olly Betts
660d51c7ca Remove blank line from end of php_pragma_runme.php
Because this was after the closing ?> it was resulting in a blank
line in the testcase output.
2019-02-09 09:00:31 +13:00
Olly Betts
8e4d135929 [PHP] Add quotes to another bareword string
Seems I missed one when I fixed all the others in the testsuite.
2019-02-08 18:10:32 +13:00
Olly Betts
3f9ebb31b9 [PHP] Don't generate code referencing undefined $r
This could happen in overloaded methods which returned void and took at
least one const std::string& parameter.
2019-02-08 18:09:52 +13:00
Zackery Spytz
28a846705f [OCaml] Fix possible GC issues in generated director code
Make `classDirectorMethod()` generate `CAMLreturn_type()` or
`CAMLreturn0` when there are local variables of type `value`.
2019-02-07 22:08:10 -07:00
Olly Betts
7345a33ccf [php] Make test helper methods static
We call them all statically so they ought to be static (PHP issues
a diagnostic about this, but that seems to be hidden by default).
2019-02-08 18:04:07 +13:00
Olly Betts
75810c0bdc [php] Fix comment typo in testsuite 2019-02-08 15:33:37 +13:00
Olly Betts
cadd97ac4f [php] Fix widespread use of bare strings in testsuite
These generate warnings with PHP 7.3, which will become errors in a
future version.
2019-02-08 15:32:30 +13:00
Olly Betts
21b3c06de6 [php] Fix test failures due to undefined GETSET constant
Move the constant into the class - the definition outside the class
doesn't seem to work with PHP 7.3.
2019-02-08 14:58:01 +13:00
Olly Betts
ebc9e6ad9f [php] Eliminate use of unset constants in example
This generates a warning with PHP 7.3 which apparently will become
an error in the future.  We're just checking that a constant that
should not be define indeed isn't, which we can achieve more
cleanly using get_defined_constants() instead.
2019-02-08 14:57:53 +13:00
Zackery Spytz
e5b8b5a164 [OCaml] Some exception improvements
The OCaml module's exception handling code was poorly designed,
gave confusing exception messages, and was vulnerable to buffer
overflows.

The OCaml module's SWIG_exception_() was adding a useless newline to
the end of the exception message.

In some cases, the integer value of f.e. SWIG_TypeError was being added
to the exception message.

The unneeded else in the OCaml module's SWIG_contract_assert() macro
was causing -Wmisleading-indentation warnings.

The OCaml module's exception handling code now mirrors that of the
Java module.

Add Lib/ocaml/std_except.i.
Add multiple runtime tests.
2019-02-07 16:25:10 -07:00
Zackery Spytz
b00ee788a2 Fix the Java tests
"uchar" and "Uchar" will both generate a getUchar() getter.
2019-02-06 09:53:37 -07:00
Seth R Johnson
373a21aa3f Fix failure of %apply directive in anonymous templates 2019-02-06 08:48:40 -05:00
Seth R Johnson
4824b56e59 Add test showing typemap failure 2019-02-06 08:48:40 -05:00
Zackery Spytz
d3b1211a92 [OCaml] Fix and re-enable typedef_mptr_runme.ml
typedef_mptr_runme.ml was attempting to pass OCaml functions to
do_op().

Remove unneeded prints.
2019-02-05 20:10:06 -07:00
Zackery Spytz
8c2cb4e604 Add support for the C++11 u and U encoding prefixes for char literals
"u" and "U" are new in C11 and C++11 for char literals.
2019-02-05 15:08:35 -07:00