# HG changeset patch # User Arun Giridhar # Date 1686484575 14400 # Node ID 13a2062926b6d54574362d81da8f0844afb87a8c # Parent d617fca340fc3edc73380e460b76a659347fbe72 colorbar.m: Add BIST (bug #64287) diff -r d617fca340fc -r 13a2062926b6 scripts/plot/draw/colorbar.m --- a/scripts/plot/draw/colorbar.m Thu Jun 08 20:24:36 2023 -0400 +++ b/scripts/plot/draw/colorbar.m Sun Jun 11 07:56:15 2023 -0400 @@ -906,6 +906,19 @@ ## FIXME: need many BIST tests for colorbar +%!test +%! unwind_protect +%! hf = figure ("visible", "off"); +%! h = subplot (1, 1, 1); +%! imagesc (reshape (1:100, 10, 10)); +%! colorbar; +%! lasterror ("reset"); +%! colormap (h, flip (gray (10))); +%! assert (isempty (lasterr)); +%! unwind_protect_cleanup +%! close (hf); +%! end_unwind_protect + ## Test input validation %!error colorbar (-pi) %!error colorbar ("east", "p", "v")