diff options
author | Olly Betts <olly@survex.com> | 2019-02-08 15:32:30 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2019-02-08 15:32:30 +1300 |
commit | cadd97ac4f3ef09e4875bd4d5524ebc9195c1444 (patch) | |
tree | dc7b404fae9e7a699540c86eb7411e9829bf5366 | |
parent | 21b3c06de664f3f29a24f4a0598bfc5f55115ff9 (diff) | |
download | swig-cadd97ac4f3ef09e4875bd4d5524ebc9195c1444.tar.gz |
[php] Fix widespread use of bare strings in testsuite
These generate warnings with PHP 7.3, which will become errors in a
future version.
47 files changed, 112 insertions, 112 deletions
diff --git a/Examples/test-suite/php/abstract_inherit_ok_runme.php b/Examples/test-suite/php/abstract_inherit_ok_runme.php index c2d86499b..c2c343dac 100644 --- a/Examples/test-suite/php/abstract_inherit_ok_runme.php +++ b/Examples/test-suite/php/abstract_inherit_ok_runme.php @@ -3,7 +3,7 @@ require "tests.php"; require "abstract_inherit_ok.php"; -check::classes(array(Foo,Spam)); +check::classes(array('Foo','Spam')); $spam=new Spam(); check::equal(0,$spam->blah(),"spam object method"); diff --git a/Examples/test-suite/php/abstract_inherit_runme.php b/Examples/test-suite/php/abstract_inherit_runme.php index 3554e6fd8..514bbc3b0 100644 --- a/Examples/test-suite/php/abstract_inherit_runme.php +++ b/Examples/test-suite/php/abstract_inherit_runme.php @@ -3,7 +3,7 @@ require "tests.php"; require "abstract_inherit.php"; -check::classes(array(Foo,Bar,Spam,NRFilter_i,NRRCFilter_i,NRRCFilterpro_i,NRRCFilterpri_i)); +check::classes(array('Foo','Bar','Spam','NRFilter_i','NRRCFilter_i','NRRCFilterpro_i','NRRCFilterpri_i')); // This constructor attempt should fail as there isn't one //$spam=new Spam(); diff --git a/Examples/test-suite/php/add_link_runme.php b/Examples/test-suite/php/add_link_runme.php index 7523bd604..3e16fa1df 100644 --- a/Examples/test-suite/php/add_link_runme.php +++ b/Examples/test-suite/php/add_link_runme.php @@ -4,15 +4,15 @@ require "tests.php"; require "add_link.php"; // No new functions, except the flat functions -check::functions(array(new_foo,foo_blah)); +check::functions(array('new_foo','foo_blah')); -check::classes(array(Foo)); +check::classes(array('Foo')); $foo=new foo(); -check::is_a($foo,foo); +check::is_a($foo,'foo'); $foo_blah=$foo->blah(); -check::is_a($foo_blah,foo); +check::is_a($foo_blah,'foo'); //fails, can't be called as a class method, should allow and make it nil? //$class_foo_blah=foo::blah(); diff --git a/Examples/test-suite/php/argout_runme.php b/Examples/test-suite/php/argout_runme.php index 33fbd8129..baf4b164e 100644 --- a/Examples/test-suite/php/argout_runme.php +++ b/Examples/test-suite/php/argout_runme.php @@ -3,7 +3,7 @@ require "tests.php"; require "argout.php"; -check::functions(array(incp,incr,inctr,new_intp,copy_intp,delete_intp,intp_assign,intp_value,voidhandle,handle)); +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)"); diff --git a/Examples/test-suite/php/arrayptr_runme.php b/Examples/test-suite/php/arrayptr_runme.php index 3b9baed05..86b7f8628 100644 --- a/Examples/test-suite/php/arrayptr_runme.php +++ b/Examples/test-suite/php/arrayptr_runme.php @@ -4,7 +4,7 @@ require "tests.php"; require "arrayptr.php"; // No new functions -check::functions(array(foo)); +check::functions(array('foo')); // No new classes check::classes(array()); // now new vars diff --git a/Examples/test-suite/php/arrays_global_runme.php b/Examples/test-suite/php/arrays_global_runme.php index 12a7806c9..95a300775 100644 --- a/Examples/test-suite/php/arrays_global_runme.php +++ b/Examples/test-suite/php/arrays_global_runme.php @@ -3,17 +3,17 @@ require "tests.php"; require "arrays_global.php"; -check::functions(array(test_a,test_b,new_simplestruct,new_material)); -check::classes(array(arrays_global,SimpleStruct,Material)); -check::globals(array(array_c,array_sc,array_uc,array_s,array_us,array_i,array_ui,array_l,array_ul,array_ll,array_f,array_d,array_struct,array_structpointers,array_ipointers,array_enum,array_enumpointers,array_const_i,beginstring_fix44a,beginstring_fix44b,beginstring_fix44c,beginstring_fix44d,beginstring_fix44e,beginstring_fix44f,chitmat,hitmat_val,hitmat,simplestruct_double_field)); +check::functions(array('test_a','test_b','new_simplestruct','new_material')); +check::classes(array('arrays_global','SimpleStruct','Material')); +check::globals(array('array_c','array_sc','array_uc','array_s','array_us','array_i','array_ui','array_l','array_ul','array_ll','array_f','array_d','array_struct','array_structpointers','array_ipointers','array_enum','array_enumpointers','array_const_i','beginstring_fix44a','beginstring_fix44b','beginstring_fix44c','beginstring_fix44d','beginstring_fix44e','beginstring_fix44f','chitmat','hitmat_val','hitmat','simplestruct_double_field')); // The size of array_c is 2, but the last byte is \0, so we can only store a // single byte string in it. -check::set(array_c,"Z"); -check::equal("Z",check::get(array_c),"set array_c"); -check::set(array_c,"xy"); -check::equal("x",check::get(array_c),"set array_c"); -check::set(array_c,"h"); -check::equal("h",check::get(array_c),"set array_c"); +check::set("array_c","Z"); +check::equal("Z",check::get("array_c"),"set array_c"); +check::set("array_c","xy"); +check::equal("x",check::get("array_c"),"set array_c"); +check::set("array_c","h"); +check::equal("h",check::get("array_c"),"set array_c"); check::done(); ?> diff --git a/Examples/test-suite/php/arrays_global_twodim_runme.php b/Examples/test-suite/php/arrays_global_twodim_runme.php index 40ecf1719..d9f50a6de 100644 --- a/Examples/test-suite/php/arrays_global_twodim_runme.php +++ b/Examples/test-suite/php/arrays_global_twodim_runme.php @@ -3,14 +3,14 @@ require "tests.php"; require "arrays_global_twodim.php"; -check::functions(array(fn_taking_arrays,get_2d_array,new_simplestruct,new_material)); -check::classes(array(arrays_global_twodim,SimpleStruct,Material)); -check::globals(array(array_c,array_sc,array_uc,array_s,array_us,array_i,array_ui,array_l,array_ul,array_ll,array_f,array_d,array_struct,array_structpointers,array_ipointers,array_enum,array_enumpointers,array_const_i,chitmat,hitmat_val,hitmat,simplestruct_double_field)); +check::functions(array('fn_taking_arrays','get_2d_array','new_simplestruct','new_material')); +check::classes(array('arrays_global_twodim','SimpleStruct','Material')); +check::globals(array('array_c','array_sc','array_uc','array_s','array_us','array_i','array_ui','array_l','array_ul','array_ll','array_f','array_d','array_struct','array_structpointers','array_ipointers','array_enum','array_enumpointers','array_const_i','chitmat','hitmat_val','hitmat','simplestruct_double_field')); $a1=array(10,11,12,13); $a2=array(14,15,16,17); $a=array($a1,$a2); -$_a=check::get(array_const_i); +$_a=check::get('array_const_i'); for($x=0;$x<count($a1);$x++) { for($y=0;$y<2;$y++) { diff --git a/Examples/test-suite/php/arrays_runme.php b/Examples/test-suite/php/arrays_runme.php index ae17d05e7..400beecea 100644 --- a/Examples/test-suite/php/arrays_runme.php +++ b/Examples/test-suite/php/arrays_runme.php @@ -2,9 +2,9 @@ require "tests.php"; require "arrays.php"; -check::functions(array(fn_taking_arrays,newintpointer,setintfrompointer,getintfrompointer,array_pointer_func)); -check::classes(array(arrays,SimpleStruct,ArrayStruct,CartPoseData_t)); -check::globals(array(simplestruct_double_field,arraystruct_array_c,arraystruct_array_sc,arraystruct_array_uc,arraystruct_array_s,arraystruct_array_us,arraystruct_array_i,arraystruct_array_ui,arraystruct_array_l,arraystruct_array_ul,arraystruct_array_ll,arraystruct_array_f,arraystruct_array_d,arraystruct_array_struct,arraystruct_array_structpointers,arraystruct_array_ipointers,arraystruct_array_enum,arraystruct_array_enumpointers,arraystruct_array_const_i,cartposedata_t_p)); +check::functions(array('fn_taking_arrays','newintpointer','setintfrompointer','getintfrompointer','array_pointer_func')); +check::classes(array('arrays','SimpleStruct','ArrayStruct','CartPoseData_t')); +check::globals(array('simplestruct_double_field','arraystruct_array_c','arraystruct_array_sc','arraystruct_array_uc','arraystruct_array_s','arraystruct_array_us','arraystruct_array_i','arraystruct_array_ui','arraystruct_array_l','arraystruct_array_ul','arraystruct_array_ll','arraystruct_array_f','arraystruct_array_d','arraystruct_array_struct','arraystruct_array_structpointers','arraystruct_array_ipointers','arraystruct_array_enum','arraystruct_array_enumpointers','arraystruct_array_const_i','cartposedata_t_p')); $ss=new simplestruct(); check::classname(simplestruct,$ss); diff --git a/Examples/test-suite/php/arrays_scope_runme.php b/Examples/test-suite/php/arrays_scope_runme.php index c208b7518..11c180870 100644 --- a/Examples/test-suite/php/arrays_scope_runme.php +++ b/Examples/test-suite/php/arrays_scope_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "arrays_scope.php"; // New functions -check::functions(array(new_bar,bar_blah)); +check::functions(array('new_bar','bar_blah')); // New classes -check::classes(array(arrays_scope,Bar)); +check::classes(array('arrays_scope','Bar')); // New vars -check::globals(array(bar_adata,bar_bdata,bar_cdata)); +check::globals(array('bar_adata','bar_bdata','bar_cdata')); $bar=new bar(); diff --git a/Examples/test-suite/php/casts_runme.php b/Examples/test-suite/php/casts_runme.php index 10522dca4..730333fc1 100644 --- a/Examples/test-suite/php/casts_runme.php +++ b/Examples/test-suite/php/casts_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "casts.php"; // No new functions -check::functions(array(new_a,a_hello,new_b)); +check::functions(array('new_a','a_hello','new_b')); // No new classes -check::classes(array(A,B)); +check::classes(array('A','B')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/class_ignore_runme.php b/Examples/test-suite/php/class_ignore_runme.php index d5ce36217..ae4881f27 100644 --- a/Examples/test-suite/php/class_ignore_runme.php +++ b/Examples/test-suite/php/class_ignore_runme.php @@ -3,8 +3,8 @@ require "tests.php"; require "class_ignore.php"; -check::functions(array(do_blah,new_bar,bar_blah,new_boo,boo_away,new_far,new_hoo)); -check::classes(array(class_ignore,Bar,Boo,Far,Hoo)); +check::functions(array('do_blah','new_bar','bar_blah','new_boo','boo_away','new_far','new_hoo')); +check::classes(array('class_ignore','Bar','Boo','Far','Hoo')); // No new vars check::globals(array()); diff --git a/Examples/test-suite/php/cpp_basic_runme.php b/Examples/test-suite/php/cpp_basic_runme.php index 6a8522e3e..b24cf7000 100644 --- a/Examples/test-suite/php/cpp_basic_runme.php +++ b/Examples/test-suite/php/cpp_basic_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "cpp_basic.php"; // New functions -check::functions(array(foo_func1,foo_func2,foo___str__,foosubsub___str__,bar_test,bar_testfoo,get_func1_ptr,get_func2_ptr,test_func_ptr,fl_window_show)); +check::functions(array('foo_func1','foo_func2','foo___str__','foosubsub___str__','bar_test','bar_testfoo','get_func1_ptr','get_func2_ptr','test_func_ptr','fl_window_show')); // New classes -check::classes(array(cpp_basic,Foo,FooSub,FooSubSub,Bar,Fl_Window)); +check::classes(array('cpp_basic','Foo','FooSub','FooSubSub','Bar','Fl_Window')); // New vars -check::globals(array(foo_num,foo_func_ptr,bar_fptr,bar_fref,bar_fval,bar_cint,bar_global_fptr,bar_global_fref,bar_global_fval)); +check::globals(array('foo_num','foo_func_ptr','bar_fptr','bar_fref','bar_fval','bar_cint','bar_global_fptr','bar_global_fref','bar_global_fval')); $f = new Foo(3); $f->func_ptr = get_func1_ptr(); diff --git a/Examples/test-suite/php/cpp_static_runme.php b/Examples/test-suite/php/cpp_static_runme.php index 9b436b87c..1d581bdb9 100644 --- a/Examples/test-suite/php/cpp_static_runme.php +++ b/Examples/test-suite/php/cpp_static_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "cpp_static.php"; // New functions -check::functions(array(staticfunctiontest_static_func,staticfunctiontest_static_func_2,staticfunctiontest_static_func_3,is_python_builtin)); +check::functions(array('staticfunctiontest_static_func','staticfunctiontest_static_func_2','staticfunctiontest_static_func_3','is_python_builtin')); // New classes -check::classes(array(StaticMemberTest,StaticFunctionTest,cpp_static,StaticBase,StaticDerived)); +check::classes(array('StaticMemberTest','StaticFunctionTest','cpp_static','StaticBase','StaticDerived')); // New vars -check::globals(array(staticmembertest_static_int,staticbase_statty,staticderived_statty)); +check::globals(array('staticmembertest_static_int','staticbase_statty','staticderived_statty')); check::done(); ?> diff --git a/Examples/test-suite/php/director_abstract_runme.php b/Examples/test-suite/php/director_abstract_runme.php index ca3d676da..1a119cfd5 100644 --- a/Examples/test-suite/php/director_abstract_runme.php +++ b/Examples/test-suite/php/director_abstract_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_abstract.php"; // No new functions -check::functions(array(foo_ping,foo_pong,example0_getxsize,example0_color,example0_get_color,example1_getxsize,example1_color,example1_get_color,example2_getxsize,example2_color,example2_get_color,example4_getxsize,example4_color,example4_get_color,example3_i_color,example3_i_get_color,g,a_f)); +check::functions(array('foo_ping','foo_pong','example0_getxsize','example0_color','example0_get_color','example1_getxsize','example1_color','example1_get_color','example2_getxsize','example2_color','example2_get_color','example4_getxsize','example4_color','example4_get_color','example3_i_color','example3_i_get_color','g','a_f')); // No new classes -check::classes(array(director_abstract,Foo,Example0,Example1,Example2,Example4,Example3_i,A)); +check::classes(array('director_abstract','Foo','Example0','Example1','Example2','Example4','Example3_i','A')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_basic_runme.php b/Examples/test-suite/php/director_basic_runme.php index af6110103..478a36f80 100644 --- a/Examples/test-suite/php/director_basic_runme.php +++ b/Examples/test-suite/php/director_basic_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "director_basic.php"; // No new functions -check::functions(array(foo_ping,foo_pong,foo_get_self,a_f,a_rg,a1_ff,myclass_method,myclass_vmethod,myclass_pmethod,myclass_cmethod,myclass_get_self,myclass_call_pmethod,myclasst_i_method,myclass_nonvirtual,myclass_nonoverride,myclass_call_nonvirtual,myclass_call_nonoverride,myclass_connect)); +check::functions(array('foo_ping','foo_pong','foo_get_self','a_f','a_rg','a1_ff','myclass_method','myclass_vmethod','myclass_pmethod','myclass_cmethod','myclass_get_self','myclass_call_pmethod','myclasst_i_method','myclass_nonvirtual','myclass_nonoverride','myclass_call_nonvirtual','myclass_call_nonoverride','myclass_connect')); // No new classes -check::classes(array(Foo,A,A1,Bar,MyClass,MyClassT_i)); +check::classes(array('Foo','A','A1','Bar','MyClass','MyClassT_i')); // now new vars -check::globals(array(bar_x)); +check::globals(array('bar_x')); class PhpFoo extends Foo { function ping() { diff --git a/Examples/test-suite/php/director_classic_runme.php b/Examples/test-suite/php/director_classic_runme.php index d2da1b1ba..a44881e04 100644 --- a/Examples/test-suite/php/director_classic_runme.php +++ b/Examples/test-suite/php/director_classic_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_classic.php"; // No new functions -check::functions(array(being_id,person_id,child_id,grandchild_id,caller_delcallback,caller_setcallback,caller_resetcallback,caller_call,caller_baseclass)); +check::functions(array('being_id','person_id','child_id','grandchild_id','caller_delcallback','caller_setcallback','caller_resetcallback','caller_call','caller_baseclass')); // No new classes -check::classes(array(Being,Person,Child,GrandChild,OrphanPerson,OrphanChild,Caller)); +check::classes(array('Being','Person','Child','GrandChild','OrphanPerson','OrphanChild','Caller')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_default_runme.php b/Examples/test-suite/php/director_default_runme.php index f97fc7425..c459ce3ec 100644 --- a/Examples/test-suite/php/director_default_runme.php +++ b/Examples/test-suite/php/director_default_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_default.php"; // No new functions -check::functions(array(foo_msg,foo_getmsg,bar_msg,bar_getmsg,defaultsbase_defaultargs,defaultsderived_defaultargs)); +check::functions(array('foo_msg','foo_getmsg','bar_msg','bar_getmsg','defaultsbase_defaultargs','defaultsderived_defaultargs')); // No new classes -check::classes(array(Foo,Bar,DefaultsBase,DefaultsDerived)); +check::classes(array('Foo','Bar','DefaultsBase','DefaultsDerived')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_detect_runme.php b/Examples/test-suite/php/director_detect_runme.php index cc19c0302..a6d3aebd6 100644 --- a/Examples/test-suite/php/director_detect_runme.php +++ b/Examples/test-suite/php/director_detect_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_detect.php"; // No new functions -check::functions(array(foo_cloner,foo_get_value,foo_get_class,foo_just_do_it,bar_baseclass,bar_cloner,bar_get_value,bar_get_class,bar_just_do_it)); +check::functions(array('foo_cloner','foo_get_value','foo_get_class','foo_just_do_it','bar_baseclass','bar_cloner','bar_get_value','bar_get_class','bar_just_do_it')); // No new classes -check::classes(array(A,Foo,Bar)); +check::classes(array('A','Foo','Bar')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_enum_runme.php b/Examples/test-suite/php/director_enum_runme.php index 8f6487a28..0571ec0da 100644 --- a/Examples/test-suite/php/director_enum_runme.php +++ b/Examples/test-suite/php/director_enum_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_enum.php"; // No new functions -check::functions(array(foo_say_hello,foo_say_hi,foo_say_bye,foo_say_hi_ref,foo_ping,foo_ping_ref,foo_ping_member_enum,a_f,a2_f)); +check::functions(array('foo_say_hello','foo_say_hi','foo_say_bye','foo_say_hi_ref','foo_ping','foo_ping_ref','foo_ping_member_enum','a_f','a2_f')); // No new classes -check::classes(array(director_enum,Foo,A,B,A2,B2)); +check::classes(array('director_enum','Foo','A','B','A2','B2')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_exception_runme.php b/Examples/test-suite/php/director_exception_runme.php index 47f645b07..dd2d04e8a 100644 --- a/Examples/test-suite/php/director_exception_runme.php +++ b/Examples/test-suite/php/director_exception_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_exception.php"; // No new functions -check::functions(array(foo_ping,foo_pong,launder,bar_ping,bar_pong,returnalltypes_return_int,returnalltypes_return_double,returnalltypes_return_const_char_star,returnalltypes_return_std_string,returnalltypes_return_bar,returnalltypes_call_int,returnalltypes_call_double,returnalltypes_call_const_char_star,returnalltypes_call_std_string,returnalltypes_call_bar,is_python_builtin)); +check::functions(array('foo_ping','foo_pong','launder','bar_ping','bar_pong','returnalltypes_return_int','returnalltypes_return_double','returnalltypes_return_const_char_star','returnalltypes_return_std_string','returnalltypes_return_bar','returnalltypes_call_int','returnalltypes_call_double','returnalltypes_call_const_char_star','returnalltypes_call_std_string','returnalltypes_call_bar','is_python_builtin')); // No new classes -check::classes(array(director_exception,Foo,Exception1,Exception2,Base,Bar,ReturnAllTypes)); +check::classes(array('director_exception','Foo','Exception1','Exception2','Base','Bar','ReturnAllTypes')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_extend_runme.php b/Examples/test-suite/php/director_extend_runme.php index f283aefbe..7aa2e0f78 100644 --- a/Examples/test-suite/php/director_extend_runme.php +++ b/Examples/test-suite/php/director_extend_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_extend.php"; // No new functions -check::functions(array(spobject_getfoobar,spobject_dummy,spobject_exceptionmethod)); +check::functions(array('spobject_getfoobar','spobject_dummy','spobject_exceptionmethod')); // No new classes -check::classes(array(SpObject)); +check::classes(array('SpObject')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_finalizer_runme.php b/Examples/test-suite/php/director_finalizer_runme.php index 0fcddfd8b..96bb5c179 100644 --- a/Examples/test-suite/php/director_finalizer_runme.php +++ b/Examples/test-suite/php/director_finalizer_runme.php @@ -4,16 +4,16 @@ require "tests.php"; require "director_finalizer.php"; // No new functions -check::functions(array(foo_orstatus,deletefoo,getstatus,launder,resetstatus)); +check::functions(array('foo_orstatus','deletefoo','getstatus','launder','resetstatus')); // No new classes -check::classes(array(director_finalizer,Foo)); +check::classes(array('director_finalizer','Foo')); // now new vars check::globals(array()); class MyFoo extends Foo { function __destruct() { $this->orStatus(2); - if (method_exists(parent, "__destruct")) { + if (method_exists(get_parent_class(), "__destruct")) { parent::__destruct(); } } diff --git a/Examples/test-suite/php/director_frob_runme.php b/Examples/test-suite/php/director_frob_runme.php index 548b0b804..450a1234b 100644 --- a/Examples/test-suite/php/director_frob_runme.php +++ b/Examples/test-suite/php/director_frob_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "director_frob.php"; // No new functions -check::functions(array(alpha_abs_method,bravo_abs_method,charlie_abs_method,ops_opint,ops_opintstarstarconst,ops_opintamp,ops_opintstar,ops_opconstintintstar,prims_ull,prims_callull,corecallbacks_on3dengineredrawn,corecallbacks_on3dengineredrawn2)); +check::functions(array('alpha_abs_method','bravo_abs_method','charlie_abs_method','ops_opint','ops_opintstarstarconst','ops_opintamp','ops_opintstar','ops_opconstintintstar','prims_ull','prims_callull','corecallbacks_on3dengineredrawn','corecallbacks_on3dengineredrawn2')); // No new classes -check::classes(array(Alpha,Bravo,Charlie,Delta,Ops,Prims,corePoint3d,coreCallbacks_On3dEngineRedrawnData,coreCallbacksOn3dEngineRedrawnData,coreCallbacks)); +check::classes(array('Alpha','Bravo','Charlie','Delta','Ops','Prims','corePoint3d','coreCallbacks_On3dEngineRedrawnData','coreCallbacksOn3dEngineRedrawnData','coreCallbacks')); // now new vars -check::globals(array(corecallbacks_on3dengineredrawndata__eye,corecallbacks_on3dengineredrawndata__at,corecallbackson3dengineredrawndata__eye,corecallbackson3dengineredrawndata__at)); +check::globals(array('corecallbacks_on3dengineredrawndata__eye','corecallbacks_on3dengineredrawndata__at','corecallbackson3dengineredrawndata__eye','corecallbackson3dengineredrawndata__at')); $foo = new Bravo(); $s = $foo->abs_method(); diff --git a/Examples/test-suite/php/director_nested_runme.php b/Examples/test-suite/php/director_nested_runme.php index 4965e94f7..9a094a182 100644 --- a/Examples/test-suite/php/director_nested_runme.php +++ b/Examples/test-suite/php/director_nested_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_nested.php"; // No new functions -check::functions(array(foo_int_advance,foo_int_do_advance,bar_step,bar_do_advance,bar_do_step,foobar_int_get_value,foobar_int_get_name,foobar_int_name,foobar_int_get_self,foobar_int_do_advance,foobar_int_do_step)); +check::functions(array('foo_int_advance','foo_int_do_advance','bar_step','bar_do_advance','bar_do_step','foobar_int_get_value','foobar_int_get_name','foobar_int_name','foobar_int_get_self','foobar_int_do_advance','foobar_int_do_step')); // No new classes -check::classes(array(Foo_int,Bar,FooBar_int)); +check::classes(array('Foo_int','Bar','FooBar_int')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_profile_runme.php b/Examples/test-suite/php/director_profile_runme.php index c72421341..c6f4c3c94 100644 --- a/Examples/test-suite/php/director_profile_runme.php +++ b/Examples/test-suite/php/director_profile_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_profile.php"; // No new functions -check::functions(array(b_fn,b_vfi,b_fi,b_fj,b_fk,b_fl,b_get_self,b_vfs,b_fs)); +check::functions(array('b_fn','b_vfi','b_fi','b_fj','b_fk','b_fl','b_get_self','b_vfs','b_fs')); // No new classes -check::classes(array(A,B)); +check::classes(array('A','B')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_protected_runme.php b/Examples/test-suite/php/director_protected_runme.php index 18586ca62..e759fed25 100644 --- a/Examples/test-suite/php/director_protected_runme.php +++ b/Examples/test-suite/php/director_protected_runme.php @@ -3,9 +3,9 @@ require "tests.php"; require "director_protected.php"; -check::functions(array(foo_pong,foo_s,foo_q,foo_ping,foo_pang,foo_used,foo_cheer,bar_create,bar_callping,bar_callcheer,bar_cheer,bar_pong,bar_used,bar_ping,bar_pang,a_draw,b_draw)); -check::classes(array(Foo,Bar,PrivateFoo,A,B,AA,BB)); -check::globals(array(bar_a)); +check::functions(array('foo_pong','foo_s','foo_q','foo_ping','foo_pang','foo_used','foo_cheer','bar_create','bar_callping','bar_callcheer','bar_cheer','bar_pong','bar_used','bar_ping','bar_pang','a_draw','b_draw')); +check::classes(array('Foo','Bar','PrivateFoo','A','B','AA','BB')); +check::globals(array('bar_a')); class FooBar extends Bar { protected function ping() { diff --git a/Examples/test-suite/php/director_stl_runme.php b/Examples/test-suite/php/director_stl_runme.php index 29addd261..f7a5c0aa0 100644 --- a/Examples/test-suite/php/director_stl_runme.php +++ b/Examples/test-suite/php/director_stl_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "director_stl.php"; // No new functions -check::functions(array(foo_bar,foo_ping,foo_pong,foo_tping,foo_tpong,foo_pident,foo_vident,foo_vsecond,foo_tpident,foo_tvident,foo_tvsecond,foo_vidents,foo_tvidents)); +check::functions(array('foo_bar','foo_ping','foo_pong','foo_tping','foo_tpong','foo_pident','foo_vident','foo_vsecond','foo_tpident','foo_tvident','foo_tvsecond','foo_vidents','foo_tvidents')); // No new classes -check::classes(array(Foo)); +check::classes(array('Foo')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/director_string_runme.php b/Examples/test-suite/php/director_string_runme.php index 5ac583f78..77e84c9bf 100644 --- a/Examples/test-suite/php/director_string_runme.php +++ b/Examples/test-suite/php/director_string_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "director_string.php"; // No new functions -check::functions(array(a_get_first,a_call_get_first,a_string_length,a_process_text,a_call_process_func,stringvector_size,stringvector_is_empty,stringvector_clear,stringvector_push,stringvector_pop,stringvector_capacity,stringvector_reserve)); +check::functions(array('a_get_first','a_call_get_first','a_string_length','a_process_text','a_call_process_func','stringvector_size','stringvector_is_empty','stringvector_clear','stringvector_push','stringvector_pop','stringvector_capacity','stringvector_reserve')); // No new classes -check::classes(array(A,StringVector)); +check::classes(array('A','StringVector')); // now new vars -check::globals(array(a,a_call,a_m_strings,stringvector)); +check::globals(array('a','a_call','a_m_strings','stringvector')); class B extends A { function get_first() { diff --git a/Examples/test-suite/php/director_thread_runme.php b/Examples/test-suite/php/director_thread_runme.php index ab0563213..2a640a022 100644 --- a/Examples/test-suite/php/director_thread_runme.php +++ b/Examples/test-suite/php/director_thread_runme.php @@ -8,11 +8,11 @@ require "director_thread.php"; exit(0); // No new functions -check::functions(array(millisecondsleep,foo_stop,foo_run,foo_do_foo)); +check::functions(array('millisecondsleep','foo_stop','foo_run','foo_do_foo')); // No new classes -check::classes(array(director_thread,Foo)); +check::classes(array('director_thread','Foo')); // now new vars -check::globals(array(foo_val)); +check::globals(array('foo_val')); class Derived extends Foo { function do_foo() { diff --git a/Examples/test-suite/php/director_unroll_runme.php b/Examples/test-suite/php/director_unroll_runme.php index 626b1f07d..79d39f5ef 100644 --- a/Examples/test-suite/php/director_unroll_runme.php +++ b/Examples/test-suite/php/director_unroll_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "director_unroll.php"; // No new functions -check::functions(array(foo_ping,foo_pong)); +check::functions(array('foo_ping','foo_pong')); // No new classes -check::classes(array(Foo,Bar)); +check::classes(array('Foo','Bar')); // now new vars -check::globals(array(bar)); +check::globals(array('bar')); class MyFoo extends Foo { function ping() { diff --git a/Examples/test-suite/php/exception_order_runme.php b/Examples/test-suite/php/exception_order_runme.php index acb83561a..77f115fa1 100644 --- a/Examples/test-suite/php/exception_order_runme.php +++ b/Examples/test-suite/php/exception_order_runme.php @@ -2,9 +2,9 @@ require "tests.php"; require "exception_order.php"; -check::functions(array(a_foo,a_bar,a_foobar,a_barfoo,is_python_builtin)); -check::classes(array(A,E1,E2,E3,exception_order,ET_i,ET_d)); -check::globals(array(efoovar,foovar,cfoovar,a_sfoovar,a_foovar,a_efoovar)); +check::functions(array('a_foo','a_bar','a_foobar','a_barfoo','is_python_builtin')); +check::classes(array('A','E1','E2','E3','exception_order','ET_i','ET_d')); +check::globals(array('efoovar','foovar','cfoovar','a_sfoovar','a_foovar','a_efoovar')); $a = new A(); try { diff --git a/Examples/test-suite/php/grouping_runme.php b/Examples/test-suite/php/grouping_runme.php index 51446f473..8bad7cd4c 100644 --- a/Examples/test-suite/php/grouping_runme.php +++ b/Examples/test-suite/php/grouping_runme.php @@ -6,14 +6,14 @@ require "grouping.php"; check::functions(array("test1","test2","do_unary","negate")); check::equal(5,test1(5),"5==test1(5)"); check::resource(test2(7),"_p_int","_p_int==test2(7)"); -check::globals(array(test3)); +check::globals(array('test3')); //check::equal(37,test3_get(),'37==test3_get()'); check::equal(37,check::get("test3"),'37==get(test3)'); //test3_set(38); -check::set(test3,38); +check::set('test3',38); //check::equal(38,test3_get(),'38==test3_get() after test3_set(37)'); -check::equal(38,check::get(test3),'38==get(test3) after set(test)'); +check::equal(38,check::get('test3'),'38==get(test3) after set(test)'); check::equal(-5,negate(5),"-5==negate(5)"); check::equal(7,do_unary(-7,NEGATE),"7=do_unary(-7,NEGATE)"); diff --git a/Examples/test-suite/php/ignore_parameter_runme.php b/Examples/test-suite/php/ignore_parameter_runme.php index 1c8c76ad4..f86a61169 100644 --- a/Examples/test-suite/php/ignore_parameter_runme.php +++ b/Examples/test-suite/php/ignore_parameter_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "ignore_parameter.php"; // New functions -check::functions(array(jaguar,lotus,tvr,ferrari,sportscars_daimler,sportscars_astonmartin,sportscars_bugatti,sportscars_lamborghini)); +check::functions(array('jaguar','lotus','tvr','ferrari','sportscars_daimler','sportscars_astonmartin','sportscars_bugatti','sportscars_lamborghini')); // New classes -check::classes(array(ignore_parameter,SportsCars,MiniCooper,MorrisMinor,FordAnglia,AustinAllegro)); +check::classes(array('ignore_parameter','SportsCars','MiniCooper','MorrisMinor','FordAnglia','AustinAllegro')); // No new vars check::globals(array()); diff --git a/Examples/test-suite/php/import_nomodule_runme.php b/Examples/test-suite/php/import_nomodule_runme.php index 41836ba0f..e5ea761f7 100644 --- a/Examples/test-suite/php/import_nomodule_runme.php +++ b/Examples/test-suite/php/import_nomodule_runme.php @@ -3,9 +3,9 @@ require "tests.php"; require "import_nomodule.php"; // No new functions -check::functions(array(create_foo,delete_foo,test1,is_python_builtin)); +check::functions(array('create_foo','delete_foo','test1','is_python_builtin')); // No new classes -check::classes(array(import_nomodule,Bar)); +check::classes(array('import_nomodule','Bar')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/li_carrays_cpp_runme.php b/Examples/test-suite/php/li_carrays_cpp_runme.php index e0f9ffe92..3e8a443f6 100644 --- a/Examples/test-suite/php/li_carrays_cpp_runme.php +++ b/Examples/test-suite/php/li_carrays_cpp_runme.php @@ -3,14 +3,14 @@ require "tests.php"; require "li_carrays_cpp.php"; // Check functions. -check::functions(array(new_intarray,delete_intarray,intarray_getitem,intarray_setitem,doublearray_getitem,doublearray_setitem,doublearray_cast,doublearray_frompointer,xyarray_getitem,xyarray_setitem,xyarray_cast,xyarray_frompointer,delete_abarray,abarray_getitem,abarray_setitem,shortarray_getitem,shortarray_setitem,shortarray_cast,shortarray_frompointer,sum_array)); +check::functions(array('new_intarray','delete_intarray','intarray_getitem','intarray_setitem','doublearray_getitem','doublearray_setitem','doublearray_cast','doublearray_frompointer','xyarray_getitem','xyarray_setitem','xyarray_cast','xyarray_frompointer','delete_abarray','abarray_getitem','abarray_setitem','shortarray_getitem','shortarray_setitem','shortarray_cast','shortarray_frompointer','sum_array')); // Check classes. // NB An "li_carrays_cpp" class is created as a mock namespace. -check::classes(array(li_carrays_cpp,doubleArray,AB,XY,XYArray,shortArray)); +check::classes(array('li_carrays_cpp','doubleArray','AB','XY','XYArray','shortArray')); // Check global variables. -check::globals(array(xy_x,xy_y,globalxyarray,ab_a,ab_b,globalabarray)); +check::globals(array('xy_x','xy_y','globalxyarray','ab_a','ab_b','globalabarray')); $d = new doubleArray(10); diff --git a/Examples/test-suite/php/li_carrays_runme.php b/Examples/test-suite/php/li_carrays_runme.php index 40e82f9ea..abe358101 100644 --- a/Examples/test-suite/php/li_carrays_runme.php +++ b/Examples/test-suite/php/li_carrays_runme.php @@ -3,14 +3,14 @@ require "tests.php"; require "li_carrays.php"; // Check functions. -check::functions(array(new_intarray,delete_intarray,intarray_getitem,intarray_setitem,doublearray_getitem,doublearray_setitem,doublearray_cast,doublearray_frompointer,xyarray_getitem,xyarray_setitem,xyarray_cast,xyarray_frompointer,delete_abarray,abarray_getitem,abarray_setitem,shortarray_getitem,shortarray_setitem,shortarray_cast,shortarray_frompointer,sum_array)); +check::functions(array('new_intarray','delete_intarray','intarray_getitem','intarray_setitem','doublearray_getitem','doublearray_setitem','doublearray_cast','doublearray_frompointer','xyarray_getitem','xyarray_setitem','xyarray_cast','xyarray_frompointer','delete_abarray','abarray_getitem','abarray_setitem','shortarray_getitem','shortarray_setitem','shortarray_cast','shortarray_frompointer','sum_array')); // Check classes. // NB An "li_carrays" class is created as a mock namespace. -check::classes(array(li_carrays,doubleArray,AB,XY,XYArray,shortArray)); +check::classes(array('li_carrays','doubleArray','AB','XY','XYArray','shortArray')); // Check global variables. -check::globals(array(xy_x,xy_y,globalxyarray,ab_a,ab_b,globalabarray)); +check::globals(array('xy_x','xy_y','globalxyarray','ab_a','ab_b','globalabarray')); $d = new doubleArray(10); diff --git a/Examples/test-suite/php/li_factory_runme.php b/Examples/test-suite/php/li_factory_runme.php index 6623e2a8c..982d7b1fd 100644 --- a/Examples/test-suite/php/li_factory_runme.php +++ b/Examples/test-suite/php/li_factory_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "li_factory.php"; // No new functions -check::functions(array(geometry_draw,geometry_create,geometry_clone_,point_draw,point_width,point_clone_,circle_draw,circle_radius,circle_clone_)); +check::functions(array('geometry_draw','geometry_create','geometry_clone_','point_draw','point_width','point_clone_','circle_draw','circle_radius','circle_clone_')); // No new classes -check::classes(array(Geometry,Point,Circle)); +check::classes(array('Geometry','Point','Circle')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/newobject1_runme.php b/Examples/test-suite/php/newobject1_runme.php index 5853a72c0..863e3e423 100644 --- a/Examples/test-suite/php/newobject1_runme.php +++ b/Examples/test-suite/php/newobject1_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "newobject1.php"; // No new functions -check::functions(array(foo_makefoo,foo_makemore,foo_foocount)); +check::functions(array('foo_makefoo','foo_makemore','foo_foocount')); // No new classes -check::classes(array(Foo)); +check::classes(array('Foo')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/overload_rename_runme.php b/Examples/test-suite/php/overload_rename_runme.php index dce4c6cb3..0357f91a6 100644 --- a/Examples/test-suite/php/overload_rename_runme.php +++ b/Examples/test-suite/php/overload_rename_runme.php @@ -6,7 +6,7 @@ require "overload_rename.php"; // No new functions check::functions(array()); // No new classes -check::classes(array(Foo)); +check::classes(array('Foo')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/php_iterator_runme.php b/Examples/test-suite/php/php_iterator_runme.php index d69a5b385..fd645ccb2 100644 --- a/Examples/test-suite/php/php_iterator_runme.php +++ b/Examples/test-suite/php/php_iterator_runme.php @@ -3,8 +3,8 @@ require "tests.php"; require "php_iterator.php"; -check::functions(array(myiterator_rewind,myiterator_key,myiterator_current,myiterator_next,myiterator_valid)); -check::classes(array(MyIterator)); +check::functions(array('myiterator_rewind','myiterator_key','myiterator_current','myiterator_next','myiterator_valid')); +check::classes(array('MyIterator')); // No new global variables. check::globals(array()); diff --git a/Examples/test-suite/php/prefix_runme.php b/Examples/test-suite/php/prefix_runme.php index ead064f5b..fcf7c66f6 100644 --- a/Examples/test-suite/php/prefix_runme.php +++ b/Examples/test-suite/php/prefix_runme.php @@ -4,9 +4,9 @@ require "tests.php"; require "prefix.php"; // No new functions -check::functions(array(foo_get_self)); +check::functions(array('foo_get_self')); // No new classes -check::classes(array(ProjectFoo)); +check::classes(array('ProjectFoo')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/sym_runme.php b/Examples/test-suite/php/sym_runme.php index 483aaa980..127d28fd9 100644 --- a/Examples/test-suite/php/sym_runme.php +++ b/Examples/test-suite/php/sym_runme.php @@ -6,7 +6,7 @@ require "sym.php"; // No new functions check::functions(array()); // No new classes -check::classes(array(flim,flam)); +check::classes(array('flim','flam')); // now new vars check::globals(array()); diff --git a/Examples/test-suite/php/template_arg_typename_runme.php b/Examples/test-suite/php/template_arg_typename_runme.php index 7d60285e3..56ef2875d 100644 --- a/Examples/test-suite/php/template_arg_typename_runme.php +++ b/Examples/test-suite/php/template_arg_typename_runme.php @@ -6,7 +6,7 @@ require "template_arg_typename.php"; // No new functions check::functions(array()); // No new classes -check::classes(array(UnaryFunction_bool_bool,BoolUnaryFunction_bool)); +check::classes(array('UnaryFunction_bool_bool','BoolUnaryFunction_bool')); $ufbb=new unaryfunction_bool_bool(); check::is_a($ufbb,"unaryfunction_bool_bool"); diff --git a/Examples/test-suite/php/template_construct_runme.php b/Examples/test-suite/php/template_construct_runme.php index 3a3986f7e..b227d9fec 100644 --- a/Examples/test-suite/php/template_construct_runme.php +++ b/Examples/test-suite/php/template_construct_runme.php @@ -3,7 +3,7 @@ require "tests.php"; require "template_construct.php"; -check::classes(array(Foo_int)); +check::classes(array('Foo_int')); $foo_int=new foo_int(3); check::is_a($foo_int,"foo_int","Made a foo_int"); diff --git a/Examples/test-suite/php/tests.php b/Examples/test-suite/php/tests.php index f1d5179c4..5a779d79c 100644 --- a/Examples/test-suite/php/tests.php +++ b/Examples/test-suite/php/tests.php @@ -31,8 +31,8 @@ class check { $extra=array(); $extrags=array(); $df=get_defined_functions(); - $df=array_flip($df[internal]); - foreach($_original_functions[internal] as $func) unset($df[$func]); + $df=array_flip($df['internal']); + foreach($_original_functions['internal'] as $func) unset($df[$func]); // Now chop out any get/set accessors foreach(array_keys($df) as $func) if ((self::GETSET && preg_match('/_[gs]et$/', $func)) || diff --git a/Examples/test-suite/php/threads_exception_runme.php b/Examples/test-suite/php/threads_exception_runme.php index 78c6bf592..80717eb88 100644 --- a/Examples/test-suite/php/threads_exception_runme.php +++ b/Examples/test-suite/php/threads_exception_runme.php @@ -4,11 +4,11 @@ require "tests.php"; require "threads_exception.php"; // Check functions -check::functions(array(test_simple,test_message,test_hosed,test_unknown,test_multi,is_python_builtin)); +check::functions(array('test_simple','test_message','test_hosed','test_unknown','test_multi','is_python_builtin')); // Check classes. -check::classes(array(Exc,Test,threads_exception)); +check::classes(array('Exc','Test','threads_exception')); // Check globals. -check::globals(array(exc_code,exc_msg)); +check::globals(array('exc_code','exc_msg')); $t = new Test(); try { diff --git a/Examples/test-suite/php/typedef_reference_runme.php b/Examples/test-suite/php/typedef_reference_runme.php index 88a70f8d3..83e75fb66 100644 --- a/Examples/test-suite/php/typedef_reference_runme.php +++ b/Examples/test-suite/php/typedef_reference_runme.php @@ -3,7 +3,7 @@ require "tests.php"; require "typedef_reference.php"; -check::functions(array(somefunc,otherfunc,new_intp,copy_intp,delete_intp,intp_assign,intp_value)); +check::functions(array('somefunc','otherfunc','new_intp','copy_intp','delete_intp','intp_assign','intp_value')); $int2=copy_intp(2); check::equal(2,somefunc($int2)," test passing intp to somefunc"); $int3=copy_intp(3); |