swig/Examples/test-suite/php/li_carrays_runme.php
Olly Betts 7983c83116 Fix case of expected functions and globals
The updated tests.php is case sensitive.
2021-05-04 15:49:30 +12:00

21 lines
635 B
PHP

<?php
require "tests.php";
// Check functions.
check::functions(array('new_intArray','delete_intArray','intArray_getitem','intArray_setitem','new_ABArray','delete_ABArray','ABArray_getitem','ABArray_setitem','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 global variables.
check::globals(array('globalXYArray','globalABArray'));
$d = new doubleArray(10);
$d->setitem(0, 7);
$d->setitem(5, $d->getitem(0) + 3);
check::equal($d->getitem(0) + $d->getitem(5), 17., "7+10==17");
check::done();