matlab(tdcs): report, switch/case entry, runners, README
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
%RUN_TESTS Run the full matlab.unittest suite and exit nonzero on failure.
|
||||
% Usage: matlab -batch "run_tests"
|
||||
% (add the analysis/matlab directory to the path first if it is not
|
||||
% already on it, e.g. matlab -batch "addpath('analysis/matlab'); run_tests")
|
||||
|
||||
thisDir = fileparts(mfilename('fullpath'));
|
||||
results = runtests(fullfile(thisDir, 'tests'));
|
||||
disp(results);
|
||||
|
||||
fprintf('PASS=%d FAIL=%d\n', sum([results.Passed]), sum([results.Failed]));
|
||||
|
||||
if any([results.Failed])
|
||||
error('run_tests:failed', 'One or more tests failed.');
|
||||
end
|
||||
Reference in New Issue
Block a user