fMRI_scripts/GIFT_Clean/UnityTestGiftIcaReport.m

22 lines
602 B
Matlab

% this file forms the unity test for GiftIcaReport
% it requires that SPM is on the search path
%% inspect if eviourment is properly set
if isempty(which('spm'));error('SPM not on the path, unity test not performed');end
%% basic call
Q = GiftIcaReport;
%% basic call with no SPM error
try
tmp=fileparts(which('spm'));
rmpath(tmp);
Q = GiftIcaReport;
catch ME
addpath(tmp); %put back the path
if ~ strcmpi(ME.identifier,'GiftIcaReport:set_SPMPath:SPM_not_found')
rethrow(ME);
else
disp('passed no SPM test')
disp(ME)
end
end