changeset 26908:6bd408bde569

* ode15i.m: Comment out failing test
author John W. Eaton <jwe@octave.org>
date Thu, 14 Mar 2019 06:25:42 +0000
parents 1d3730539776
children 5042a568771a
files scripts/ode/ode15i.m
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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];