Mercurial > octave
view test/bug-54490.tst @ 30206:aaee7b170cb1
nchoosek.m: Allow struct inputs (bug #61119)
* nchoosek.m: Change input validation to avoid numeric checks if input V is
scalar but not a number. Add BIST tests for exceptional values of scalar
structs and struct arrays.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 23 Sep 2021 12:19:54 -0700 |
parents | 9080316864bf |
children |
line wrap: on
line source
%!function out = bug54490 () %! global k; %! k = 1; %! out = 3; %!endfunction %!test <*54490> %! global k; %! k = 2; %! a = [5, 6]; %! a(k) = bug54490 (); %! assert (a, [5, 3]); %! k = 2; %! a = [5, 6]; %! [a(k)] = bug54490 (); %! assert (a, [5, 3]); %! clear -global k; # cleanup after test