Commit graph

35 commits

Author SHA1 Message Date
Olly Betts
1392a6e497 [PHP] When using %throws or %catches, SWIG-generated PHP5 wrappers
now throw PHP Exception objects instead of giving a PHP error of
type E_ERROR.

This change shouldn't cause incompatibility issues, since you can't
set an error handler for E_ERROR, so previously PHP would just exit
which also happens for unhandled exceptions.  The benefit is you can
now catch them if you want to.

Fixes SF#2545578 and SF#2955522.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12055 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-26 07:32:20 +00:00
William S Fulton
9f55943801 Fix RUNTOOL in the test-suite for php and add an example for using RUNTOOL to invoke a debugger
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12050 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-25 18:13:32 +00:00
William S Fulton
d324633cfa Fix php limited precision test fix when dealing with large long long numbers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12030 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-14 19:47:39 +00:00
Olly Betts
8461ba43ff Update lists of expected function, classes, and globals to match what we get
with PHP5.  There are no longer any warnings about these.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11771 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-04 03:54:24 +00:00
Olly Betts
2c50482854 Fix testcase to conform with actual expected behaviour.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-03 14:12:42 +00:00
Olly Betts
d277354167 Add long long and unsigned long long const reference typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-03 05:21:48 +00:00
Miklos Vajna
3c604b402d PHP: remove unneeded ctor from the director_extend testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-18 13:47:27 +00:00
Miklos Vajna
82df087b8b PHP: remove '// Sample test file' comments from runme files
Those are cut&pasted from skel.php, but that comment makes sense only in
skel.php itself.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11598 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-16 22:23:32 +00:00
Olly Betts
5118c399f0 Fix valuewrapper_base_runme.php for PHP5. Still fails though.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11580 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 07:39:56 +00:00
Olly Betts
719df6b10a Fix pointer_reference_runme.php for PHP5 - now passes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11579 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 06:08:28 +00:00
William S Fulton
45359dc12c Add SWIGTYPE *& typemaps for PHP
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11556 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 01:14:49 +00:00
Olly Betts
1f55c29eee Zap extra blank line after ?> which appears in testsuite output
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11554 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 00:15:23 +00:00
William S Fulton
cc43f20f6d PHP fix const char\*\& typemaps and add in char_strings runtime test based on Java version
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 23:31:19 +00:00
William S Fulton
42d7f3bb10 add php typecheck typemaps for const reference for primitives
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11551 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 22:39:20 +00:00
William S Fulton
627d9faffd Add PHP const ref typemaps for primitive types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 21:41:23 +00:00
Olly Betts
dd96b09e68 Fix the list of classes expected.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 04:13:35 +00:00
Olly Betts
d3809285a4 Change class names in test code which clash with PHP reserved words
(Interface, Class, and Function - these are case insensitive reserved
words in PHP).

Fix lists of expected methods in rename_scope_runme.php to match those
which we expect with PHP5.  With this and the change above, this testcase
now passes.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11545 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 03:58:09 +00:00
Olly Betts
54018f66a2 Correct the human-readable messages in 3 assertions.
Remove meaningless comment.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11544 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 03:35:48 +00:00
Olly Betts
ce3d4db364 Update the list of expected methods for smart_pointer_rename for PHP5 so this
testcase now passes.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 03:31:38 +00:00
Miklos Vajna
451f71d7b1 remove unnecessary extra semicolons in the tesuite
Basically just style cleanup, "fi;" or "fi; \" -> "fi".

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11523 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-09 22:52:08 +00:00
William S Fulton
56c5b52c1d remove unnecessary extra shells being spawned in the test-suite
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11522 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-09 22:39:51 +00:00
Miklos Vajna
d5e546f07f PHP: Run testcase.php if testcase_runme.php is not found in the testsuite
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11521 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-09 14:51:22 +00:00
Miklos Vajna
09b20003fb PHP: fix for the overload_rename testcase
Previously we just had two __construct function which resulted in a
parse error. Now we create a new factory method for the renamed ctor.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-06 12:27:03 +00:00
Miklos Vajna
5161a12868 PHP: detect if a non-object is passed to check::classname() in the testsuite
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-05 12:37:56 +00:00
Miklos Vajna
9444f2cebe PHP: fix for the import_nomodule testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11490 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-03 13:52:25 +00:00
Olly Betts
c321421bc5 [PHP] Update warnings about clashes between identifiers and PHP
keywords and automatic renaming to work with the PHP5 class 
wrappers.  Fixes SF#1613679.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11460 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-28 13:12:06 +00:00
Miklos Vajna
0249eea389 Merge https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-vmiklos/
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11434 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-22 11:08:29 +00:00
Olly Betts
531e341309 Fix rename_scope testcase to pass
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11370 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-06 06:48:37 +00:00
William S Fulton
9064b08651 better way to provide custom commandline options for individual tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11356 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-03 22:23:43 +00:00
Olly Betts
16ef97f362 Remove non-standard targets makecpptests, makectests, maketests, runcpptests,
runctests, runtests - the C ones at least don't work properly, and haven't for
a long time.
Remove explicit use of bash from missingcpptests and missingctests as it isn't
required and bash may not be available.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11259 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-15 12:27:21 +00:00
Olly Betts
64843143f1 The default out typemap for char[ANY] now returns up to a zero byte, or the end
of the array if there is no zero byte.  This is the same as Python does, and seems
more generally useful than the previous behaviour of returning the whole
contents of the array including any zero bytes.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11176 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-03-30 02:22:14 +00:00
Olly Betts
c05ddc9d14 check::equal() now reports the values if they aren't equal.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11175 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-03-30 02:01:12 +00:00
William S Fulton
bcc796f676 modify build system to use php instead of php4
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10967 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-06 21:40:54 +00:00
William S Fulton
db83e51441 modify test-suite (barring python atm) to not rely on the -I path to find the input .i file - removes the new warning 125 and sets up the test-suite for testing with ccache. This change required the use of -outcurrentdir and moving the .i files from the language subdirectories to the directory above along with some .i file name changes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10949 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-26 21:35:15 +00:00
William S Fulton
4c03864ce9 rename php4 to php
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10938 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-22 12:35:27 +00:00