|
|
|
@ -20,14 +20,18 @@ function ret = mUnittest(script)
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
% print summary |
|
|
|
|
summary(); |
|
|
|
|
if (summary()) |
|
|
|
|
ret = 0; |
|
|
|
|
else |
|
|
|
|
ret = 1; |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
ret = 1; |
|
|
|
|
end%if |
|
|
|
|
|
|
|
|
|
end%function mUnittest |
|
|
|
|
|
|
|
|
|
function summary() |
|
|
|
|
function ret = summary() |
|
|
|
|
|
|
|
|
|
% get number of passed and failed tests |
|
|
|
|
result = assert(); |
|
|
|
@ -48,6 +52,8 @@ function summary()
|
|
|
|
|
fid = fopen(sprintf('%sReport.xml', className()), 'w'); |
|
|
|
|
fprintf(fid, '<testsuite tests="%d" time="%.f">%s\n</testsuite>',num, t, xml); |
|
|
|
|
fclose(fid); |
|
|
|
|
|
|
|
|
|
ret = f == 0; |
|
|
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|