1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<?php
require "tests.php";
// New functions
check::functions(array('mainc', 'mainv', 'initializeapp'));
// New classes
check::classes(array('argcargvtest'));
// No new vars
check::globals(array());
$largs = array('hi', 'hola', 'hello');
check::equal(mainc($largs), 3, 'Test main typemap 1');
$targs = array('hi', 'hola');
check::equal(mainv($targs, 1), 'hola', 'Test main typemap 2');
$error = 0;
try {
mainv('hello', 1);
$error = 1;
}
catch (exception $e) {
}
check::equal($error, 0, 'Test main typemap 3');
initializeApp($largs);
check::done();
|