Update unit tests for trust region routines.

trustregion
Stéphane Adjemian (Ryûk) 2022-03-25 19:36:50 +01:00
parent b9bc1e7cb1
commit cdd85f32a7
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 8 additions and 1 deletions

View File

@ -50,7 +50,6 @@ objfun = { @rosenbrock,
@broydenbanded };
% FIXME block_trust_region (mex) or trust_region (matlab) do not work for all n (not sure we can fix that).
% FIXME block_trust_region (mex) and trust_region (matlab) do not behave the same (spurious convergence for powell2 and trigonometric with block_trust_region).
%
% Test mex routine
@ -82,6 +81,14 @@ for i=1:length(objfun)
dprintf('Nonlinear solver is expected to fail on %s function but did not return an error.', func2str(objfun{i}))
end
end
elseif isequal(func2str(objfun{i}), 'trigonometric')
% FIXME block_trust_region (mex) fails, with exit code equal to 4, but not trust_region (matlab). Would be nice to undertsand the difference.
if ~errorflag
testFailed = testFailed+1;
if debug
dprintf('Nonlinear solver is expected to fail on %s function but did not return an error.', func2str(objfun{i}))
end
end
else
if errorflag || norm(objfun{i}(x))>tolf
testFailed = testFailed+1;