<?php require "tests.php"; require "conversion_namespace.php"; check::classes(array("Foo", "Bar")); $bar = new Bar(); check::classname("bar", $bar); $foo = $bar->toFoo(); check::classname("foo", $foo); check::done();
<?php 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)); $ss = new simplestruct(); check::classname(simplestruct, $ss); $as = new arraystruct(); $as->array_c = "abc"; check::equal($as->array_c, "a", '$as->array_c=="a"'); check::done();
<?php require "tests.php"; require "overload_return_type.php"; $b = new B(); check::equal($b->foo(1), 0, ""); check::classname("A", $b->foo("test")); check::equal(overload_return_type::foo(), 1, "overload_return_type::foo() should be 1"); check::equal(overload_return_type::bar(), 1, "overload_return_type::bar() should be 1");
<?php require "tests.php"; require "ignore_parameter.php"; // No new functions check::functions(array(jaguar, lotus, tvr, ferrari)); // No new classes check::classes(array(sportscars, minicooper, morrisminor, fordanglia, austinallegro)); // now new vars check::globals(array()); check::equal(jaguar(2, 3.4), "hello", 'jaguar(2,3.4)=="hello"'); check::equal(lotus("eek", 3.4), 101, 'lotus("eek",3.4)==101'); check::equal(tvr("eek", 2), 8.800000000000001, 'tvr("eek",2)==8.8'); check::equal(ferrari(), 101, 'ferrari(2)==101'); $sc = new sportscars(); check::classname("sportscars", $sc); check::equal($sc->daimler(2, 3.4), "hello", '$sc->daimler(2,3.4)=="hello"'); check::equal($sc->astonmartin("eek", 3.4), 101, '$sc->mastonmartin("eek",3.4)==101'); check::equal($sc->bugatti("eek", 2), 8.800000000000001, '$sc->bugatti("eek",2)==8.8'); check::equal($sc->lamborghini(), 101, '$sc->lamborghini(2)==101'); $mc = new minicooper(2, 3.4); check::classname("minicooper", $mc); $mm = new morrisminor("eek", 3.4); check::classname("morrisminor", $mm); $fa = new fordanglia("eek", 2); check::classname("fordanglia", $fa); $aa = new austinallegro(); check::classname("austinallegro", $aa); check::done();
<?php require "tests.php"; require "smart_pointer_rename.php"; check::classes(array("Foo", "Bar")); check::classmethods("foo", array("ftest1", "ftest2", "__set", "__isset", "__get", "__construct")); check::classmethods("bar", array("__deref__", "test", "ftest1", "ftest2", "__set", "__isset", "__get", "__construct")); $foo = new foo(); check::classname("foo", $foo); $bar = new bar($foo); check::classname("bar", $bar); # check foo's ftest1, ftest2 check::equal(1, $foo->ftest1(1), "foo->ftest1"); check::equal(2, $foo->ftest2(1, 2), "foo->ftest2"); # check bar's ftest1, ftest2, ftest check::equal(1, $bar->ftest1(1), "bar->ftest1"); check::equal(2, $bar->ftest2(1, 2), "bar->ftest2"); check::equal(3, $bar->test(), "bar->test"); # check deref returns foo check::classname("foo", $bar->__deref__()); check::done();
<?php require "tests.php"; require "valuewrapper_base.php"; check::classes(array("valuewrapper_base", "Base", "Interface_BP")); check::functions("make_interface_bp"); $ibp = valuewrapper_base::make_interface_bp(); check::classname("interface_bp", $ibp); check::done();