PageRenderTime 21ms CodeModel.GetById 10ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/php/argout_runme.php

#
PHP | 37 lines | 24 code | 9 blank | 4 comment | 1 complexity | f42af4b3e03e066975b6436593652a1d MD5 | raw file
 1<?php
 2
 3require "tests.php";
 4require "argout.php";
 5
 6check::functions(array(incp,incr,inctr,new_intp,copy_intp,delete_intp,intp_assign,intp_value,voidhandle,handle));
 7
 8$ip=copy_intp(42);
 9check::equal(42,incp($ip),"42==incp($ip)");
10check::equal(43,intp_value($ip),"43=$ip");
11
12$p=copy_intp(2);
13check::equal(2,incp($p),"2==incp($p)");
14check::equal(3,intp_value($p),"3==$p");
15
16$r=copy_intp(7);
17check::equal(7,incr($r),"7==incr($r)");
18check::equal(8,intp_value($r),"8==$r");
19
20$tr=copy_intp(4);
21check::equal(4,inctr($tr),"4==incr($tr)");
22check::equal(5,intp_value($tr),"5==$tr");
23
24# Check the voidhandle call, first with null
25unset($handle);
26voidhandle(&$handle);
27check::resource($handle,"_p_void",'$handle is not _p_void');
28$handledata=handle($handle);
29check::equal($handledata,"Here it is","\$handledata != \"Here it is\"");
30
31unset($handle);
32// without reference, should fatal error so can't test here
33//voidhandle($handle);
34//check::isnull($handle,'$handle not null');
35
36check::done();
37?>