Mercurial > octave
view test/bug-54490.tst @ 30880:74089676bd9d
bitset.m: Clean up function.
* bitset.m: Rename output variable to "B" for "bit". Output is capitalized to
indicate it could be an array. Rename internal variable "cl" to "cls" for
clarity. Rewrite cumbersome "if ((n < 1)(:))" syntax using post logical test
forced column conversion to "if (n(:) < 1)". Add comment to BIST test for
empty input to clarify what it is testing. Re-order input validation BIST
tests for clarity.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 01 Apr 2022 14:39: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