octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64287] Calling colormap after colorbar causes


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #64287] Calling colormap after colorbar causes error
Date: Sat, 10 Jun 2023 09:21:49 -0400 (EDT)

Follow-up Comment #3, bug #64287 (project octave):

I've not written a BIST for a graphics function before. Here is an attempt:


%!test
%! hf = figure ("visible", "off");
%! try
%!   imagesc (reshape (1:100, 10, 10));
%!   colorbar;
%!   colormap (flip (gray (32)));
%!   colorbar;
%! catch
%!   assert (false);
%! end_try_catch
%! close (hf);


The hope was that the "undefined variable" error would cause the catch section
to be executed, which would cause an assertion failure, but testing it still
says all tests passed even after giving the error:


octave:1> test colorbar
error: 'd' undefined near line 491, column 21
error: called from
    colorbar>cb_colormap at line 491 column 7
    colormap at line 133 column 10
    __test__ at line 7 column 4
    test at line 682 column 11
PASSES 8 out of 8 tests


How to change that?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64287>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]