File: argout_runme.php

package info (click to toggle)
renderdoc 1.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 79,584 kB
  • sloc: cpp: 491,671; ansic: 285,823; python: 12,617; java: 11,345; cs: 7,181; makefile: 6,703; yacc: 5,682; ruby: 4,648; perl: 3,461; php: 2,119; sh: 2,068; lisp: 1,835; tcl: 1,068; ml: 747; xml: 137
file content (38 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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));

$ip=copy_intp(42);
check::equal(42,incp($ip),"42==incp($ip)");
check::equal(43,intp_value($ip),"43=$ip");

$p=copy_intp(2);
check::equal(2,incp($p),"2==incp($p)");
check::equal(3,intp_value($p),"3==$p");

$r=copy_intp(7);
check::equal(7,incr($r),"7==incr($r)");
check::equal(8,intp_value($r),"8==$r");

$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\"");

unset($handle);
voidhandle($handle);
check::isnull($handle,'$handle not null');

check::done();
?>