Mercurial > octave-nkf
changeset 19703:2099e00b1833
colormaps.tst: Don't show a figure during 'make check'
* colormaps.tst: Create an invisible figure to prevent empty figure from
showing during tests. Add unwind_protect block to close figure.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sat, 07 Feb 2015 11:32:47 -0500 |
parents | b2fe4dbe5266 |
children | e5facc6eec13 |
files | test/colormaps.tst |
diffstat | 1 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/test/colormaps.tst Sat Feb 07 10:47:25 2015 -0500 +++ b/test/colormaps.tst Sat Feb 07 11:32:47 2015 -0500 @@ -17,21 +17,26 @@ ## <http://www.gnu.org/licenses/>. %!test -%! all_colormaps = colormap ("list"); +%! hf = figure ("visible", "off"); +%! unwind_protect +%! all_colormaps = colormap ("list"); %! -%! assert (numel (all_colormaps) > 0) +%! assert (numel (all_colormaps) > 0) %! -%! for i = 1:numel (all_colormaps) -%! f = str2func (all_colormaps{i}); +%! for i = 1:numel (all_colormaps) +%! f = str2func (all_colormaps{i}); %! -%! assert (iscolormap (f (1))) -%! assert (iscolormap (f (12))) -%! assert (iscolormap (f (200))) +%! assert (iscolormap (f (1))) +%! assert (iscolormap (f (12))) +%! assert (iscolormap (f (200))) %! -%! ## bug #44070 -%! assert (class (f (uint8 (12))), "double") -%! assert (iscolormap (f (uint8 (12)))) +%! ## bug #44070 +%! assert (class (f (uint8 (12))), "double") +%! assert (iscolormap (f (uint8 (12)))) %! -%! assert (f (0), zeros (0, 3)) -%! endfor +%! assert (f (0), zeros (0, 3)) +%! endfor +%! unwind_protect_cleanup +%! close (hf); +%! end_unwind_protect