# HG changeset patch # User John W. Eaton # Date 1552544742 0 # Node ID 6bd408bde569b74c83be781cc2aba79b361abbfe # Parent 1d3730539776362f32d9da47c8c93ba867e032c3 * ode15i.m: Comment out failing test diff -r 1d3730539776 -r 6bd408bde569 scripts/ode/ode15i.m --- a/scripts/ode/ode15i.m Thu Mar 14 05:42:35 2019 +0000 +++ b/scripts/ode/ode15i.m Thu Mar 14 06:25:42 2019 +0000 @@ -575,14 +575,16 @@ %! "invalid value assigned to field 'Jacobian'"); ## Jacobian strange field -## FIXME: we need a better way to silence the warning from odeset. -%!testif HAVE_SUNDIALS -%! saved_opts = warning (); -%! warning ("off", "all"); -%! opt = odeset ("Jacobian", "_5yVNhWVJWJn47RKnzxPsyb_"); -%! fail ("[t, y] = ode15i (@rob, [0, 4e6], [1; 0; 0], [-1e-4; 1e-4; 0], opt)", -%! "invalid value assigned to field 'Jacobian'"); -%! warning (saved_opts); +## FIXME: for compatibility with Matlab, it is no longer an error to +## create a handle to a nonexistent function and ode15i just checks that +## the argument is a function handle (it is) so there is no error for +## this case now. If this check really must be done early, before +## attempting to use the invalid function handle, then one way is to +## call "functions" on it and catch the error if it is invalid. +##%!testif HAVE_SUNDIALS +##%! opt = odeset ("Jacobian", "_5yVNhWVJWJn47RKnzxPsyb_"); +##%! fail ("[t, y] = ode15i (@rob, [0, 4e6], [1; 0; 0], [-1e-4; 1e-4; 0], opt)", +##%! "invalid value assigned to field 'Jacobian'"); %!function ydot = fun (t, y, yp) %! ydot = [y - yp];