Mercurial > hg > octave-nkf
diff scripts/plot/allchild.m @ 13977:08ae07e40d4f
Only run uimenu tests if FLTK toolkit is available (Bug #34908)
* graphics_toolkit.m: Correct @deftypefn to @deftypefnx for Texinfo to build
* allchild.m: Eliminate unnecessary for loop. Only run test if FLTK toolkit
is available.
* findall.m, uimenu.m: Only run test if FLTK toolkit is available.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 02 Dec 2011 14:48:45 -0800 |
parents | e81ddf9cacd5 |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/scripts/plot/allchild.m +++ b/scripts/plot/allchild.m @@ -35,25 +35,23 @@ shh = get (0, "showhiddenhandles"); unwind_protect set (0, "showhiddenhandles", "on"); - if (isscalar (handles)) - h = get (handles, "children"); - else - h = cell (size (handles)); - for i = 1:numel (handles) - h{i} = get (handles, "children"); - endfor - endif + h = get (handles, "children"); unwind_protect_cleanup set (0, "showhiddenhandles", shh); end_unwind_protect endfunction -%!test + +%!testif HAVE_FLTK +%! toolkit = graphics_toolkit (); +%! graphics_toolkit ("fltk"); %! hf = figure ("visible", "off"); %! unwind_protect %! l = line; -%! assert(get(allchild(hf),'type'),{'axes'; 'uimenu'; 'uimenu'; 'uimenu'}) +%! assert(get (allchild (hf),"type"),{"axes"; "uimenu"; "uimenu"; "uimenu"}); %! unwind_protect_cleanup %! close (hf); +%! graphics_toolkit (toolkit); %! end_unwind_protect +