diff options
Diffstat (limited to 'Examples/test-suite/php/argout_runme.php')
-rw-r--r-- | Examples/test-suite/php/argout_runme.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Examples/test-suite/php/argout_runme.php b/Examples/test-suite/php/argout_runme.php index 8b66613fd..554d07756 100644 --- a/Examples/test-suite/php/argout_runme.php +++ b/Examples/test-suite/php/argout_runme.php @@ -1,7 +1,6 @@ <?php require "tests.php"; -require "argout.php"; check::functions(array('incp','incr','inctr','new_intp','copy_intp','delete_intp','intp_assign','intp_value','voidhandle','handle')); @@ -21,18 +20,14 @@ $tr=copy_intp(4); check::equal(4,inctr($tr),"4==incr($tr)"); check::equal(5,intp_value($tr),"5==$tr"); -# Check the voidhandle call, first with null -unset($handle); -# FIXME: Call-time pass-by-reference has been deprecated for ages, and was -# removed in PHP 5.4. We need to rework -#voidhandle(&$handle); -#check::resource($handle,"_p_void",'$handle is not _p_void'); -#$handledata=handle($handle); -#check::equal($handledata,"Here it is","\$handledata != \"Here it is\""); - +# Check the voidhandle call, first with NULL and then with the SWIG\p_void we +# get from the first call. $handle=NULL; -voidhandle($handle); -check::isnull($handle,'$handle not null'); +for ($i=0; $i != 1; $i++) { + voidhandle($handle); + check::equal(get_class($handle),"SWIG\\_p_void",'$handle is not _p_void'); + $handledata=handle($handle); + check::equal($handledata,"Here it is","\$handledata != \"Here it is\""); +} check::done(); -?> |