Mercurial > octave
changeset 32110:13a2062926b6 stable
colorbar.m: Add BIST (bug #64287)
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Sun, 11 Jun 2023 07:56:15 -0400 |
parents | d617fca340fc |
children | 7b29c030493d abf64c84fe66 |
files | scripts/plot/draw/colorbar.m |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <expected string argument at position 1> colorbar (-pi) %!error <LOC specification must occur as final arg> colorbar ("east", "p", "v")