rbmatlab 0.10.01
|
00001 function OK = test_all 00002 % function OK = test_all 00003 % 00004 % function calling all tests and printing diagnostics. 00005 % should be called after major changes. 00006 % 00007 % the called tests should output some information, that can be 00008 % interpreted. The called tests should not break with an error, such that 00009 % this routine will consecutively perform all tests, even if a failed 00010 % test occurs. 00011 00012 % Bernard Haasdonk 20.8.2007 00013 00014 test_names = { 00015 'test_basisgen_init', ... 00016 'test_cacheable_object', ... 00017 'test_checkpointing',... 00018 'test_data_tree',... 00019 'test_ei_detailed',... 00020 'test_fail',... 00021 'test_fakeMPI_basisgen',... 00022 'test_gradient_approx',... 00023 'test_gradient_approx_matrix', ... 00024 'test_indexed_node',... 00025 'test_ldg_derivative',... 00026 'test_ldgfunc',... 00027 'test_ldg_orthogonality',... 00028 'test_lebesgue', ... 00029 'test_linear_convection',... 00030 'test_matlab_convdiff', ... 00031 'test_orthonormalize',... 00032 'test_power_vector2',... 00033 'test_rb_basisgen', ... 00034 'test_rb_lin_evol', ... 00035 'test_rb_local_ext' ... 00036 'test_stochastic_assessment',... 00037 'test_subgrid_operators',... 00038 'test_two_phase_datafunc', ... 00039 'test_twophase_jacobian', ... 00040 'test_xpart_map' ... 00041 }; 00042 00043 OKs = zeros(1,length(test_names)); 00044 00045 for i = 1:length(test_names); 00046 disp('-----------------------------------------------------------') 00047 disp(['testing ', test_names{i}]); 00048 try 00049 OKs(i) = feval(test_names{i}); 00050 catch 00051 warning(['test ',test_names{i},' failed!']); 00052 OKs(i) = 0; 00053 end; 00054 if OKs(i)==0 00055 disp(' => failed') 00056 else 00057 disp(' => success') 00058 end; 00059 end; 00060 00061 disp('-----------------------------------------------------------') 00062 disp('test results:'); 00063 resstr = {'failed', 'OK'}; 00064 for i = 1:length(test_names); 00065 disp([test_names{i},' => ' resstr{OKs(i)+1}]); 00066 end; 00067 disp('-----------------------------------------------------------') 00068 00069 OK = all(OKs); 00070 00071 00072 00073 %| \docupdate