Skip to content

Commit

Permalink
Add cellfun BIST for function failing to return requested output (bug…
Browse files Browse the repository at this point in the history
… #66642).

* cellfun.cc:  Add BIST expecting an error to be produced by cellfun if the
supplied function fails to return values for all requested outputs.
  • Loading branch information
NRJank committed Jan 6, 2025
1 parent 3dc65e4 commit c9271c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libinterp/corefcn/cellfun.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,12 @@ v = cellfun (@@det, C); # 40% faster
%! [1, 2, NaN]);
%! assert (! isempty (__errmsg));
%! clear -global __errmsg;
%!function [a, b] = __counterror (x)
%! a = x;
%!endfunction
%!test <66642>
%! fail ("[a, b] = cellfun (@__counterror, {1, 4})");
*/

// Arrayfun was originally a .m file written by Bill Denney and Jaroslav
Expand Down

0 comments on commit c9271c1

Please sign in to comment.