source: projects/ckbs/trunk/test/all_ok.m @ 95

Last change on this file since 95 was 35, checked in by bradbell, 11 years ago

Revmove reference to gpl2.txt and further shorten copyright and license statement

File size: 1.9 KB
Line 
1% -------------------------------------------------------------------
2% ckbs: Constrained Kalman-Bucy Smoother Program: Copyright (C) 2006
3% Authors: Bradlely Bell:        bradbell at washington dot edu
4%          Gianluigi Pillonetto: giapi at dei dot unipd dot it
5% License: GNU General Public License Version 2
6% -------------------------------------------------------------------
7% $begin all_ok.m$$  $newlinech %$$
8% $spell
9%       nargin
10%       ckbs
11%       blkdiag
12%       Mul
13%       ok ok
14%       ckbs_sumsq_hes
15%       Obj
16%       ckbs_tridiag_solve
17%       feval
18%       vec
19%       cputime
20%       cputime
21%       disp
22%       num2str
23%       ind
24%       findstr
25%       Kuhn
26%       dotdot
27% $$
28%
29% $section Run All Correctness Tests$$
30%
31% $index all_ok$$
32% $index test, run all$$
33% $index correct, test all$$
34%
35% $head Syntax$$
36% $syntax%all_ok
37% all_ok(%quick%)%$$
38%
39% $head quick$$
40% If $italic quick$$ is true (or not present), only the quick tests are run,
41% otherwise all the tests are run.
42%
43% $children%
44%       test/test_path.m
45% %$$
46% $head Test Utility Functions$$
47% $table
48% $rref test_path.m$$
49% $tend
50%
51% $head Source Code$$
52% $newlinech $$ $codep
53function [ok] = all_ok(quick)
54if nargin < 1
55        quick = true;
56end
57test_path;
58ok = true;
59t0 = cputime;
60ok = ok & one_ok('affine_ok_box');
61ok = ok & one_ok('blkdiag_mul_ok');
62ok = ok & one_ok('blkdiag_mul_t_ok');
63ok = ok & one_ok('kuhn_tucker_ok');
64ok = ok & one_ok('newton_step_ok');
65ok = ok & one_ok('nonlinear_ok_simple');
66ok = ok & one_ok('sumsq_grad_ok');
67ok = ok & one_ok('sumsq_hes_ok');
68ok = ok & one_ok('sumsq_obj_ok');
69ok = ok & one_ok('tridiag_solve_ok');
70if ~ quick
71        ok = ok & one_ok('nonlinear_ok_box');
72        ok = ok & one_ok('nonlinear_ok_sin');
73end
74%
75t1 = cputime;
76if ok
77        disp(['All tests passed: cputime (secs) = ', num2str(t1-t0)]);
78else
79        disp(['One or more tests failed: cputime (secs) = ', num2str(t1-t0)]);
80end
81return
82end
83function [ok] = one_ok(name)
84ok = feval(name);
85if ok
86        ['Ok:    ', name ]
87else
88        ['Error: ', name ]
89end
90return
91end
92% $$ $newlinech %$$
93% $end
Note: See TracBrowser for help on using the repository browser.