Olly Betts
5840aca0d9
php: Enable more testcases
2021-04-21 15:46:41 +12:00
Olly Betts
f24ea7c162
php: Enable prefix testcase
...
This tests that the SWIG/PHP -prefix command line option works. It
has a _runme.php and the testcase passes, but it wasn't listed to
be run.
2021-04-20 12:11:13 +12:00
Olly Betts
f45bf4db23
php: Fix director_profile_runme.php
...
Since 76c2c4675b the fn method is
renamed to c_fn, because `fn` was added as a keyword in PHP 7.4.
2021-04-20 12:04:02 +12:00
Olly Betts
d084173ee7
php: Enable testcase director_stl
...
This already had a _runme.php which passes as-is, but wasn't listed to
be run.
2021-04-20 12:02:21 +12:00
Olly Betts
ff1c88f5ba
Hook up sym testcase
...
This has existed since at least the "great merge" and even has a
_runme.php, but seems to have never actually been listed as a testcase
to run.
2021-04-20 11:56:27 +12:00
Olly Betts
49d923b917
php: Fix director_overload_runme.php printing empty line
2021-03-30 10:56:23 +13:00
Olly Betts
e54d44c4be
php: Omit closing ?> in manual and examples
...
PSR-12 says "The closing ?> tag MUST be omitted from files containing
only PHP".
2021-03-23 11:47:19 +13:00
Olly Betts
3584c7d49c
Add initial support for PHP8
...
Testcase director_overload2 is failing, but the rest of the testsuite
passes.
2021-03-19 19:30:27 +13:00
Olly Betts
b7dedecfdd
php: Fix char* typecheck typemap to accept Null
...
The corresponding in typemap already does.
Fixes #1655 , reported by CJSlominski.
2021-03-19 08:34:15 +13:00
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
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
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
5d976b0ebe
Fix php testcase warning
2019-04-30 23:44:41 +01:00
Olly Betts
9db02a1e6b
Update PHP testsuite for vadz's new cars
2019-02-12 10:27:31 +13: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
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
William S Fulton
b7db45661a
Fix overloading for non-pointers and NULL - Php
2018-12-30 12:00:49 +00:00
William S Fulton
220a735ec5
Update php test
2018-10-09 19:37:07 +01:00
luz.paz
60dfa31a67
Misc. typos
...
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton
50cb18087d
test-suite fixes (2) for compilers that don't support varargs
...
Split director_exception testcase into two so that testing throw(),
with no arguments, that is nothrows, can be tested separately to throw()
taking arguments. [The throw keyword needs to be removed for C++
compilation in C++11 and later when it was deprecated.]
2018-05-06 09:46:37 +01:00
William S Fulton
08210236ef
Fix newobject3 testcase
...
Fixes Octave problem which has a template called product.
2017-10-10 08:05:21 +01:00
Olly Betts
0ca47dd7cc
CHANGES.current entry and regression test for previous commit
2017-10-09 11:09:58 +13:00
William S Fulton
0a9113dcba
Correct php testcase
2017-09-19 07:37:29 +01:00
William S Fulton
9e2a12416c
Fix type promotion wrapping some non-trivial constant expressions
...
This was previously an integral type instead of a floating point type:
2017-09-18 07:06:27 +01:00
William S Fulton
90ba174fce
Fix generated code for constant expressions containing wchar_t L literals.
...
Such as:
# define __WCHAR_MAX (0x7fffffff + L'\0')
Reported on swig-user mailing list.
2017-09-17 19:02:55 +01:00
Nihal
7f72398eb6
Add tests for PHP pragma version to both PHP5 and PHP7.
...
Pragma version to specify version of PHP5 and PHP7 extensions.
See issue #360 .
2017-05-08 12:02:18 +05:30
William S Fulton
173c028dd4
Add test and changes entry for Python -builtin %array_class fix
...
Issue https://github.com/swig/swig/issues/446
2016-12-18 17:50:47 +00:00
Olly Betts
c8a5f84cd1
[PHP7] Wrap bool constants as PHP booleans
...
Leave PHP5 wrapping them as integers as this change could cause
incompatibilities.
Fixes issue https://github.com/swig/swig/issues/686 noted by Nishant
Gupta.
2016-11-30 17:19:11 +13:00
Olly Betts
c7f593e1b1
Enable li_factory testcase for PHP
...
It already works and already even has a runtest!
2016-11-30 13:07:36 +13:00
Olly Betts
1169874f59
[PHP] Add support for PHP7.
...
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
2016-11-30 13:05:59 +13:00
William S Fulton
58461c1ffd
php run test fixes for new functions in testcase
2016-10-15 17:58:21 +01:00
Olly Betts
26bbc96d58
Arrange to return after calling zend_throw_exception()
...
Fixes github issue#240.
2016-09-16 17:54:02 +12:00
Olly Betts
a4015acaca
[PHP] Fix out typemap for member function pointers
...
The existing typemap was just broken - it correctly created the resource
and then did nothing with it, and instead tried to register the member
pointer as a normal pointer, which is never going to work as it's larger
than a normal pointer.
Add cpp_basic_runme.php as a regression test for this.
2016-09-02 09:51:18 +12:00
Olly Betts
888e9c6fec
Use preg_match() in PHP test harness code
...
ereg() and eregi() were deprecated in PHP 5.3.0 and removed in PHP 7.0.0,
and preg_match() has been available since PHP4.
2016-09-02 09:09:24 +12:00
William S Fulton
98a31ff633
Fix directorin SWIGTYPE typemaps to make a copy as these are used for pass by value.
...
Closes #434
2016-05-14 21:32:24 +01:00
William S Fulton
9600c95234
Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_carrays
2016-02-21 18:04:04 +00:00
Olly Betts
9e69a2c198
Use name of PHP resource not wrapped C++ type
...
Since callback::foo_T<int> isn't a PHP resource, that error message doesn't
really make sense as it was. As discussed in #467 .
2015-09-04 12:14:21 +12:00
William S Fulton
ca64b06229
Consistent quoting in Makefile
2015-08-21 22:48:34 +01:00
Vadim Zeitlin
a4b319ce8e
Remove callback function from autodoc unit test.
...
It doesn't seem to belong there at all, there is a dedicated callback unit
test for it and it was added to the initial version of autodoc.i back in
124253d698 without any explanation, so just
remove it.
As this callback was used in a PHP test, perform this test for callback.i now
and use "%(uppercase)s" construct inside %callback to test that this works.
2015-07-19 18:14:06 +02:00
Vadim Zeitlin
08fa873638
Make callback unit test pass for PHP backend.
...
Deprecated %callback(1) doesn't work with PHP, use "%s" to give the same name
to the callback as to the C function explicitly instead.
2015-07-19 00:13:08 +02:00
Olly Betts
ecf3ab5605
Disable director_thread_runme.php
...
This fails in a ZTS build of PHP.
2015-01-15 09:32:34 +13:00