1function test_all (performance)
2%TEST_ALL test the Factorize package (factorize, inverse, and related)
3%
4% If you have editted the Factorize package, type "clear classes" before
5% running any tests.
6%
7% Example
8%   test_all                % run all tests
9%   test_all (0) ;          % do not run performance tests
10%
11% See also factorize, inverse, test_performance, test_accuracy, test_disp,
12% test_errors
13
14% Copyright 2011-2012, Timothy A. Davis, http://www.suitesparse.com
15
16if (nargin < 1)
17    performance = 1 ;
18end
19
20help test_all
21reset_rand ;
22test_disp ;                 % test disp(F)
23test_errors ;               % test error handling for invalid matrices
24err1 = test_functions ;     % functionality tests
25err2 = test_accuracy ;      % test accuracy on a range of problems
26err3 = test_all_svd ;       % test SVD factorization
27err4 = test_all_cod ;       % test COD, COD_SPARSE, and RQ factorizations
28err = max ([err1 err2 err3 err4]) ;
29if (performance)
30    err = max (err, test_performance) ;         % performance tests
31end
32fprintf ('\nAll tests passed, maximum error OK: %g\n', err) ;
33