PageRenderTime 14ms CodeModel.GetById 8ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
PHP | 22 lines | 12 code | 6 blank | 4 comment | 0 complexity | 8531fa1070f9198a6b9dc214b06e1dcb MD5 | raw file
 1<?php
 2require "tests.php";
 3require "li_carrays.php";
 4
 5// Check functions.
 6check::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));
 7
 8// Check classes.
 9// NB An "li_carrays" class is created as a mock namespace.
10check::classes(array(li_carrays,doubleArray,AB,XY,XYArray));
11
12// Check global variables.
13check::globals(array(xy_x,xy_y,globalxyarray,ab_a,ab_b,globalabarray));
14
15$d = new doubleArray(10);
16
17$d->setitem(0, 7);
18$d->setitem(5, $d->getitem(0) + 3);
19check::equal($d->getitem(0) + $d->getitem(5), 17., "7+10==17");
20
21check::done();
22?>