scilab: fix line number error in swigtesterror()
This commit is contained in:
parent
a56cfc86f5
commit
b58d996743
1 changed files with 3 additions and 2 deletions
|
|
@ -36,8 +36,8 @@ end
|
||||||
// Error management function
|
// Error management function
|
||||||
function swigtesterror(msg)
|
function swigtesterror(msg)
|
||||||
[lines, names] = where();
|
[lines, names] = where();
|
||||||
if size(lines, '*') > 1
|
if size(lines, '*') > 0
|
||||||
mfprintf(0, "*** TEST FAILED (at line %d) ***\n", lines(2));
|
mfprintf(0, "*** TEST FAILED (at line %d) ***\n", lines($));
|
||||||
if argn(2) >= 1 then disp(msg); end
|
if argn(2) >= 1 then disp(msg); end
|
||||||
else
|
else
|
||||||
mfprintf(0, "*** TEST FAILED ***\n");
|
mfprintf(0, "*** TEST FAILED ***\n");
|
||||||
|
|
@ -45,6 +45,7 @@ function swigtesterror(msg)
|
||||||
exit(1)
|
exit(1)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
// Check equal function
|
||||||
function checkequal(returned, expected, message)
|
function checkequal(returned, expected, message)
|
||||||
if typeof(returned) <> typeof(expected) then
|
if typeof(returned) <> typeof(expected) then
|
||||||
returned_type_msg = ["returned type:"; typeof(returned)];
|
returned_type_msg = ["returned type:"; typeof(returned)];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue