scilab: implement test bools
This commit is contained in:
parent
4aa870c318
commit
68cb49600d
1 changed files with 20 additions and 0 deletions
20
Examples/test-suite/scilab/bools_runme.sci
Normal file
20
Examples/test-suite/scilab/bools_runme.sci
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
exec("swigtest.start", -1);
|
||||
|
||||
function checkBool(bool_val, expected_bool_val)
|
||||
if typeof(bool_val) <> "boolean" then swigtesterror(); end
|
||||
if bool_val <> expected_bool_val then swigtesterror(); end
|
||||
endfunction
|
||||
|
||||
checkBool(constbool_get(), %f);
|
||||
|
||||
checkBool(bool1_get(), %t);
|
||||
checkBool(bool2_get(), %f);
|
||||
|
||||
checkBool(bo(%t), %t);
|
||||
checkBool(bo(%f), %f);
|
||||
|
||||
bs = new_BoolStructure();
|
||||
checkBool(BoolStructure_m_bool1_get(bs), %t);
|
||||
checkBool(BoolStructure_m_bool2_get(bs), %f);
|
||||
|
||||
exec("swigtest.quit", -1);
|
||||
Loading…
Add table
Add a link
Reference in a new issue