No BSD License  

Highlights from
MUnit: a unit testing framework in Matlab

MUnit: a unit testing framework in Matlab

by

 

05 Jun 2006 (Updated )

A complete unit testing framework in Matlab

testRun(filename,runner)
function tso = testRun(filename,runner)
% TESTRUN  Collects and runs a testset with a specified runner
%
%  This function do all the work collecting a test, running it and rturning
% the results.
%
%  Params
%  ------
% IN:
%  filename     =  Can be a filename or dirname, is used for the collecting
%                 process. (def=pwd)
%  runner       =  Is the runner selected for the output generation.
%                 (def=@testrunnerTextSimple)
% OUT:
%  tso          = The output od the execution.

% Check params:
if nargin<1 filename=pwd; end
if nargin<2 runner=@testrunnerTextSimple; end

% Collecting:
ts = testcollect(filename,true);

% Runnerizing:
ts = feval(runner,ts,true);

% Running:
tso = feval(runner,ts);

Contact us