Home > matpower4.0 > t > t_skip.m

t_skip

PURPOSE ^

T_SKIP Skips a number of tests.

SYNOPSIS ^

function t_skip(cnt, msg)

DESCRIPTION ^

T_SKIP  Skips a number of tests.
   T_SKIP(CNT, MSG) increments the global test count and skipped tests
   count. Prints 'skipped tests x..y : ' followed by the MSG, unless the
   global variable t_quiet is true. Intended to be called between calls to
   T_BEGIN and T_END.

   Example:
       quiet = 0;
       t_begin(5, quiet);
       t_ok(pi > 3, 'size of pi');
       t_skip(3, 'not yet written');
       t_is(2+2, 4, 12, '2+2 still equals 4');
       t_end;

   See also T_OK, T_IS, T_BEGIN, T_END, T_RUN_TESTS.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function t_skip(cnt, msg)
0002 %T_SKIP  Skips a number of tests.
0003 %   T_SKIP(CNT, MSG) increments the global test count and skipped tests
0004 %   count. Prints 'skipped tests x..y : ' followed by the MSG, unless the
0005 %   global variable t_quiet is true. Intended to be called between calls to
0006 %   T_BEGIN and T_END.
0007 %
0008 %   Example:
0009 %       quiet = 0;
0010 %       t_begin(5, quiet);
0011 %       t_ok(pi > 3, 'size of pi');
0012 %       t_skip(3, 'not yet written');
0013 %       t_is(2+2, 4, 12, '2+2 still equals 4');
0014 %       t_end;
0015 %
0016 %   See also T_OK, T_IS, T_BEGIN, T_END, T_RUN_TESTS.
0017 
0018 
0019 %   MATPOWER
0020 %   $Id: t_skip.m,v 1.6 2010/04/26 19:45:26 ray Exp $
0021 %   by Ray Zimmerman, PSERC Cornell
0022 %   Copyright (c) 2004-2010 by Power System Engineering Research Center (PSERC)
0023 %
0024 %   This file is part of MATPOWER.
0025 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0026 %
0027 %   MATPOWER is free software: you can redistribute it and/or modify
0028 %   it under the terms of the GNU General Public License as published
0029 %   by the Free Software Foundation, either version 3 of the License,
0030 %   or (at your option) any later version.
0031 %
0032 %   MATPOWER is distributed in the hope that it will be useful,
0033 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0034 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0035 %   GNU General Public License for more details.
0036 %
0037 %   You should have received a copy of the GNU General Public License
0038 %   along with MATPOWER. If not, see <http://www.gnu.org/licenses/>.
0039 %
0040 %   Additional permission under GNU GPL version 3 section 7
0041 %
0042 %   If you modify MATPOWER, or any covered work, to interface with
0043 %   other modules (such as MATLAB code and MEX-files) available in a
0044 %   MATLAB(R) or comparable environment containing parts covered
0045 %   under other licensing terms, the licensors of MATPOWER grant
0046 %   you additional permission to convey the resulting work.
0047 
0048 global t_quiet;
0049 global t_counter;
0050 global t_skip_cnt;
0051 
0052 if nargin < 2 || strcmp(msg, '')
0053     msg = '';
0054 else
0055     msg = [' : ', msg];
0056 end
0057 
0058 t_skip_cnt = t_skip_cnt + cnt;
0059 if ~t_quiet
0060     fprintf('skipped tests %d..%d%s\n', t_counter, t_counter+cnt-1, msg);
0061 end
0062 t_counter = t_counter + cnt;

Generated on Mon 26-Jan-2015 14:56:45 by m2html © 2005