📄 jlab_runtests.m
字号:
function[]=jlab_runtests(str)%JLAB_RUNTESTS Run test suite for JLAB package.%% JLAB_RUNTEST runs all automated tests for the JLAB package.%% 'jlab_runtest figures' will make all possible sample figures.% _________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information% (C) 2002--2006 J.M. Lilly --- type 'help jlab_license' for details if nargin==0 str='tests';endlist=jlab_list;names=fieldnames(list);for i=1:length(names) if strcmpi(str(1:3),'tes') if ~isempty(findstr(getfield(list,names{i}),'t')) try disp(['Testing ' names{i} '...']) eval([names{i} '(''--t'');']); catch end end elseif strcmpi(str(1:3),'fig') if ~isempty(findstr(getfield(list,names{i}),'f')) try disp(['Generating figure for ' names{i} '...']) eval([names{i} '(''--f'');']); catch end end endendif 0%/********************************************************dirname=whichdir('jlab_license');%Make a list of all m-file namesx=dir(dirname);for i=1:length(x) y{i}=x(i).name;endx=y;%remove elements which are not .m index=find(ismname(x));if ~isempty(index) x=x(index);else x=[];endbool=ones(length(x),1);%Set exclusionsfor i=1:length(x) if strcmp(x{i}(1:end-2),'jlab_runtests') %Avoid recursion bool(i)=0; end if strfind(x{i},'makefigs') bool(i)=0; endendfor i=1:length(x) if bool(i) try eval([x{i}(1:end-2) '(''--t'');']); catch %disp(x{i}(1:end-2)) %err=lasterror; %disp(err.message) end endendend%\********************************************************% Tests not current working for randspecmat, wavegrid, ridgerecon
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -