Mercurial > octave
view test/bug-53579.tst @ 33251:93b856b2d87e
don't allow error_if and error_unless macros to be defined to be empty
* error.h (error_if, error_unless): Don't allow these macros to be
defined away by compiling with NDEBUG defined. Update comments to
discourage using error_if, error_impossible, and error_unless.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 25 Mar 2024 13:49:47 -0400 |
parents | 13362cd35b72 |
children |
line wrap: on
line source
%!function [raa, rbb, igaa, igbb] = sub1 (aa, bb) %! global aa bb; %! aa = 1; %! raa = aa; %! rbb = bb; %! igaa = isglobal ("aa"); %! igbb = isglobal ("bb"); %!endfunction %!test <*53579> %! global aa bb; %! assert (isglobal ("aa")); %! assert (isglobal ("bb")); %! aa = 3; %! xx = 5; %! warning ('off', 'Octave:global-local-conflict', 'local'); %! [raa, rbb, igaa, igbb] = sub1 (aa, xx); %! assert (raa, 1); %! assert (rbb, []); %! assert (igaa); %! assert (igbb); %! assert (xx, 5); %! clear -global aa bb; # cleanup after test