rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
test_all.m
1 function OK = test_all
2 % function OK = test_all
3 %
4 % function calling all tests and printing diagnostics.
5 % should be called after major changes.
6 %
7 % the called tests should output some information, that can be
8 % interpreted. The called tests should not break with an error, such that
9 % this routine will consecutively perform all tests, even if a failed
10 % test occurs.
11 
12 % Bernard Haasdonk 20.8.2007
13 
14 test_names = {'test_basisgen_init',...
15  'test_cacheable_object', ...
16  'test_matlab_convdiff',...
17  'test_checkpointing',...
18  'test_data_tree',...
19  'test_ei_detailed',...
20  'test_fail',...
21  'test_gradient_approx',...
22  'test_gradient_approx_matrix', ...
23  'test_indexed_node',...
24  'test_ldgfunc', ...
25  'test_ldg_derivative',...
26  'test_ldg_orthogonality', ...
27  'test_lebesgue', ...
28  'test_linear_convection',...
29  'test_matlab_convdiff',...
30  'test_orthonormalize',...
31  'test_p_part',...
32  'test_porsche',...
33  'test_power_vector2',...
34  'test_rb_basisgen', ...
35  'test_rb_lin_evol', ...
36  'test_rb_local_ext', ...
37  'test_rb_richards_fv', ...
38  'test_stochastic_assessment',...
39  'test_subgrid_operators',...
40  'test_two_phase_datafunc',...
41  'test_twophase_jacobian',...
42  'test_xpart_map'};
43 % 'test_fakeMPI_basisgen',...
44 
45 OKs = zeros(1,length(test_names));
46 
47 for i = 1:length(test_names);
48  disp('-----------------------------------------------------------')
49  disp(['testing ', test_names{i}]);
50  try
51  OKs(i) = feval(test_names{i});
52  catch
53  warning(['test ',test_names{i},' failed!']);
54  OKs(i) = 0;
55  end;
56  if OKs(i)==0
57  disp(' => failed')
58  else
59  disp(' => success')
60  end;
61 end;
62 
63 disp('-----------------------------------------------------------')
64 disp('test results:');
65 resstr = {'failed', 'OK'};
66 for i = 1:length(test_names);
67  disp([test_names{i},' => ' resstr{OKs(i)+1}]);
68 end;
69 disp('-----------------------------------------------------------')
70 
71 OK = all(OKs);
72 
73 
74 
75 %| \docupdate