File: li_carrays_cpp_runme.php

package info (click to toggle)
renderdoc 1.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 79,584 kB
  • sloc: cpp: 491,671; ansic: 285,823; python: 12,617; java: 11,345; cs: 7,181; makefile: 6,703; yacc: 5,682; ruby: 4,648; perl: 3,461; php: 2,119; sh: 2,068; lisp: 1,835; tcl: 1,068; ml: 747; xml: 137
file content (22 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
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 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 global variables.
check::globals(array(xy_x,xy_y,globalxyarray,ab_a,ab_b,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();
?>