Fix argcargv.i in Perl5, Tcl, PHP
Add missing type map for type check. Add testing of argcargv.i for Perl5, Tcl, PHP and Ruby. Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
This commit is contained in:
parent
464d548d71
commit
b88fe498ca
7 changed files with 123 additions and 0 deletions
29
Examples/test-suite/php/argcargvtest_runme.php
Normal file
29
Examples/test-suite/php/argcargvtest_runme.php
Normal file
|
|
@ -0,0 +1,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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue