Commit graph

5,452 commits

Author SHA1 Message Date
Olly Betts
860731e0ea Remove redundant test cases
With C++ comments changed to C comments, these are now identical to
the two cases just above, aside from the `2` suffix on the names.

Follow-on for #2027.
2021-12-23 11:55:47 +13:00
William S Fulton
2d76057571 preproc_cpp test for testing preprocessor and C++
Move C++ comment testing into here.
See 7a9bf3307f.
2021-12-22 19:06:00 +00:00
Olly Betts
1b22fef8ad [php] Add missing runmes for overload_* testcases 2021-12-22 13:40:29 +13:00
William S Fulton
7a9bf3307f Remove C++ comments from preproc C test
Closes issue #2127
2021-12-21 22:36:42 +00:00
Olly Betts
a7f2c3d19b [php] Add overload_simple_runme.php 2021-12-18 18:45:52 +13:00
Olly Betts
7d75e3eb7e [PHP] Add new PHP 8.1 keyword
Add PHP keyword 'readonly' (added in 8.1) to the list SWIG knows to
automatically rename.  This keyword is special in that PHP allows it to
be used as a function (or method) name.
2021-12-18 15:30:38 +13:00
Olly Betts
dee8b65823 [php] Always use <?php to start .php file
A few files had just <? which only works when the short_open_tag option
is on.  It is on by default (at least in current PHP versions) and we
explicitly tell PHP not to read php.ini, but the PHP docs recommended to
avoid it, and PHP can be built with --disable-short-tags.
2021-12-18 15:00:56 +13:00
Olly Betts
cc5395a669 [php] Add more checks to some PHP testcases 2021-12-18 14:38:49 +13:00
Olly Betts
f04d741d1c [php] Actually implement abstract_inherit_runme.php
The previous version didn't really test anything useful.  Now we
check that trying to instantiate any of the abstract classes fails
with the expected error.
2021-12-18 14:09:56 +13:00
Olly Betts
b78f0ee263 [php] Add runme for long_long testcase 2021-12-13 09:30:42 +13:00
Olly Betts
883b42dc70 [php] Ensure _runme.php calls check::done()
This function doesn't do anything currently so these missing calls are a
latent issue.  It could be used for e.g. memory leak checking in the
future though, and it's potentially a useful place to add code when
debugging.
2021-12-05 12:40:44 +13:00
Olly Betts
ee3c9bd697 [php] Check fooCount() in newobject1_runme.php 2021-12-05 12:40:44 +13:00
Olly Betts
c25df74807 [php7] Use destructor action if present
If there's a destructor, use its action instead of free(ptr)
(for C)/delete ptr (for C++).

Fixes #2108
2021-12-02 19:15:34 +13:00
Dimitris Apostolou
f586d920f7
Fix typos 2021-11-17 07:07:02 +02:00
William S Fulton
63733a3b5c Short struct name in cpp11_final_override for Scilab 2021-11-15 22:56:29 +00:00
William S Fulton
99954d6d4e Shorten testcase variable names for Scilab 6 to work 2021-11-15 22:45:56 +00:00
William S Fulton
b53b2f1a27 Shorter names in cpp11_rvalue_reference3 testcase for Scilab 2021-11-15 22:13:27 +00:00
William S Fulton
e6b6fa93aa Fix guile examples for C11 and later conformance 2021-11-15 19:25:41 +00:00
William S Fulton
54e2ad073f Fix cpp11_type_aliasing test
Ordering fix for Guile wrappers to compile
2021-11-15 08:00:46 +00:00
William S Fulton
10af8fd921 Workaround Lua failing cpp11_raw_string_literals test 2021-11-12 19:45:25 +00:00
William S Fulton
842ed6ca9d Testcase warning fix using gcc-11
warning: ‘this’ pointer is null [-Wnonnull]
2021-11-12 19:00:20 +00:00
William S Fulton
6cafc93135 -Wfree-nonheap-object warning fix using gcc-11 2021-11-12 19:00:20 +00:00
William S Fulton
d15a3cb1d4 Fix testcase -Wstringop-truncation warning in gcc11 2021-11-12 19:00:20 +00:00
William S Fulton
1bd3e771a0 Fix C tests for Javascript and c++17 2021-11-11 19:56:37 +00:00
William S Fulton
76d8e2cfaf
Merge pull request #2064 from jschueller/py310
[Python] Fix overload_simple_cast test with 3.10
2021-10-20 19:45:55 +01:00
Vadim Zeitlin
f038fcb44d Do nothing in li_std_functors test when using Ruby 2.6
This test sporadically crashes when run in GitHub Actions environment,
so skip it for now when using the Ruby 2.6 version installed by rvm.
2021-10-01 04:26:15 +02:00
Vadim Zeitlin
4b05d8d947 Don't run ccomplextest as part of JavaScript test suite
This test currently fails due to "I" being undefined, so disable it to
let the rest of the tests to pass and add it later when this can be
fixed.
2021-10-01 02:11:11 +02:00
Vadim Zeitlin
58a49bac66 Suppress more -Wignored-qualifiers in JavaScript tests
This is probably not the greatest idea, and it would be better to change
the generated code to avoid these tests instead, but it was already done
like this for several tests, so just add two more of them that generate
warnings such as

../../member_funcptr_galore_wrap.cxx: In function ‘SwigV8ReturnValue _wrap_MemberFuncPtrs_aaa6(const SwigV8Arguments&)’:
../../member_funcptr_galore_wrap.cxx:3495:90: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
 3495 |   result = (int)((MemberFuncPtrs const *)arg1)->aaa6((short (Funcs::*const )(bool) const)arg2);
      |                                                                                          ^~~~

when using gcc 9.
2021-10-01 01:39:12 +02:00
Vadim Zeitlin
f0b3010440 Avoid another warning about deprecated implicit copy ctor
This is similar to the previous commit, but in the other direction, with
the warning being generated for the implicitly-declared copy ctor due to
having an explicitly-declared assignment operator.

And the fix is different too because we need to have an assignment
operator in this test, so define the copy ctor explicitly too.
2021-10-01 01:39:12 +02:00
Vadim Zeitlin
1f7cd009c9 Remove unnecessary warning triggering copy ctors from the test
Defining a copy ctor results in -Werror=deprecated-copy when using
implicitly-generated assignment operator with recent gcc versions, so
simply remove this copy ctor, which was apparently never needed anyhow,
to avoid it and rely on the compiler generating both the copy ctor and
assignment operator implicitly.
2021-10-01 01:39:12 +02:00
Julien Schueller
a2850397ba [Python] Fix overload_simple_cast test with 3.10
Closes #2044
2021-08-05 14:07:30 +02:00
Olly Betts
a54d62b22e [UFFI] Remove code for Common Lisp UFFI
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Olly Betts
b7a99f22f5 [S-EXP] Remove code for Common Lisp S-Exp
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Olly Betts
11bb422bd3 [Pike] Remove code for Pike
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Olly Betts
12f3a85916 [Modula3] Remove code for Modula3
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Olly Betts
f3ba54c3bb [CLISP] Remove code for GNU Common Lisp
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Olly Betts
5f38f9cc78 [Chicken] Remove code for Chicken
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-16 08:42:39 +12:00
Olly Betts
353baebfcf [Allegrocl] Remove code for Allegro Common Lisp
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.

See #2009.
2021-05-13 10:38:40 +12:00
Olly Betts
b671a37e89 [php] Fix reserved class names TRUE, FALSE, NULL
PHPCN(x) does a string compare of x with the lower-cased class name,
so x needs to be in lowercase or else the entry has no effect.  The
entries for TRUE, FALSE and NULL weren't working as a result.
2021-05-12 16:45:42 +12:00
Olly Betts
ead90be779 [php] Fix -prefix when there are subclasses
The calls to the parent class' magic __get, __set and __isset methods
weren't getting the prefix.
2021-05-12 15:04:31 +12:00
Olly Betts
7983c83116 Fix case of expected functions and globals
The updated tests.php is case sensitive.
2021-05-04 15:49:30 +12:00
Olly Betts
c45fb9d2e1 Add member_pointer_const_runme.php 2021-05-04 15:29:46 +12:00
Olly Betts
0d028d8942 Rework tests.php
Previously this relied on getting all known classes/functions/etc
when it was loaded, and then again after the PHP module being
tested was loaded.  This approach no longer works now we've
stopped loading modules using dl(), so use ReflectionExtension
instead to get information about a specific extension.

This is likely also faster than wading through lists including
everything predefined by PHP.
2021-05-04 15:26:45 +12:00
Olly Betts
f2009ef681 Fix and restore disabled code in PHP value example 2021-05-04 14:21:13 +12:00
Olly Betts
32283991c5 Don't generate a .php wrapper file by default
It's now only generated if something to put in it is specified via:

%pragma(php) include=...

or

%pragma(php) code=...
2021-05-04 14:14:56 +12:00
Olly Betts
61f00daee4 Fix extension= value for PHP < 7.2 2021-05-04 08:04:36 +12:00
Olly Betts
586eb24efe php: Stop using dl()
With modern PHP it only works with the CLI version of PHP, so it's
better to direct users to load the extension via "extension=" in
php.ini.

Suggested by ferdynator in #1529.
2021-05-03 18:42:28 +12:00
Olly Betts
c87047fd39 Merge branch 'master' into gsoc2017-php7-classes-via-c-api 2021-05-03 16:17:02 +12:00
Olly Betts
81d1618777 Adjust director_finalizer_runme.php
Without inventing a SWIG/PHP-specific mechanism, we can't really
finalise objects in the way the testcase expects, so adjust the
testcase minimally so we avoid triggering C++ undefined behaviour
(use-after-free).
2021-05-03 16:07:50 +12:00
Olly Betts
9ddc9dceb7 Remove support for $source and $target
These were officially deprecated in 2001, and attempts to use them have
resulted in a warning (including a pointer to what to update them to)
for most if not all of that time.

Fixes #1984
2021-04-30 10:20:14 +12:00