Home > matpower7.0 > most > lib > t > test_most.m

test_most

PURPOSE ^

TEST_MOST Run all MOST tests.

SYNOPSIS ^

function success = test_most(verbose, exit_on_fail)

DESCRIPTION ^

TEST_MOST  Run all MOST tests.
   TEST_MOST
   TEST_MOST(VERBOSE)
   TEST_MOST(VERBOSE, EXIT_ON_FAIL)
   SUCCESS = TEST_MOST(...)

   Runs all of the MOST tests. If VERBOSE is true (false by default),
   it prints the details of the individual tests. If EXIT_ON_FAIL is true
   (false by default), it will exit MATLAB or Octave with a status of 1
   unless T_RUN_TESTS returns ALL_OK.

   See also T_RUN_TESTS.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function success = test_most(verbose, exit_on_fail)
0002 %TEST_MOST  Run all MOST tests.
0003 %   TEST_MOST
0004 %   TEST_MOST(VERBOSE)
0005 %   TEST_MOST(VERBOSE, EXIT_ON_FAIL)
0006 %   SUCCESS = TEST_MOST(...)
0007 %
0008 %   Runs all of the MOST tests. If VERBOSE is true (false by default),
0009 %   it prints the details of the individual tests. If EXIT_ON_FAIL is true
0010 %   (false by default), it will exit MATLAB or Octave with a status of 1
0011 %   unless T_RUN_TESTS returns ALL_OK.
0012 %
0013 %   See also T_RUN_TESTS.
0014 
0015 %   MOST
0016 %   Copyright (c) 2004-2016, Power Systems Engineering Research Center (PSERC)
0017 %   by Ray Zimmerman, PSERC Cornell
0018 %
0019 %   This file is part of MOST.
0020 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0021 %   See https://github.com/MATPOWER/most for more info.
0022 
0023 if nargin < 2
0024     exit_on_fail = 0;
0025     if nargin < 1
0026         verbose = 0;
0027     end
0028 end
0029 
0030 tests = {};
0031 
0032 %% MOST tests
0033 have_c3sopf = exist('c3sopf', 'file') == 2;
0034 tests{end+1} = 't_most_3b_1_1_0';
0035 tests{end+1} = 't_most_3b_3_1_0';
0036 if have_c3sopf
0037     tests{end+1} = 't_most_3b_1_1_2';
0038     tests{end+1} = 't_most_3b_3_1_2';
0039 end
0040 tests{end+1} = 't_most_30b_1_1_0';
0041 tests{end+1} = 't_most_30b_3_1_0';
0042 if have_c3sopf
0043     tests{end+1} = 't_most_30b_1_1_17';
0044     tests{end+1} = 't_most_30b_3_1_17';
0045 end
0046 tests{end+1} = 't_most_fixed_res';
0047 tests{end+1} = 't_most_30b_1_1_0_uc';
0048 if have_c3sopf
0049     tests{end+1} = 't_most_sp';
0050     tests{end+1} = 't_most_spuc';
0051 end
0052 tests{end+1} = 't_most_uc';
0053 tests{end+1} = 't_most_suc';
0054 tests{end+1} = 't_most_w_ds';
0055 
0056 %% run the tests
0057 all_ok = t_run_tests( tests, verbose );
0058 
0059 %% handle success/failure
0060 if exit_on_fail && ~all_ok
0061     exit(1);
0062 end
0063 if nargout
0064     success = all_ok;
0065 end

Generated on Mon 24-Jun-2019 15:58:45 by m2html © 2005