jlab_runtests.m

来自「JLAB is a set of Matlab functions I have」· M 代码 · 共 86 行

M
86
字号
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 + =
减小字号Ctrl + -
显示快捷键?