Mercurial > octave
diff scripts/plot/findobj.m @ 13124:2ea1658ad049
Don't use explicit figure number for tests to avoid interference with any figures opened by user.
(plot/allchild.m, plot/ancestor.m, plot/cla.m, plot/clf.m, plot/close.m,
plot/findall.m, plot/findobj.m, plot/gca.m, plot/gcf.m, plot/hggroup.m,
plot/isfigure.m, plot/line.m, plot/loglog.m, plot/patch.m, plot/semilogx.m,
plot/semilogy.m, plot/surface.m, plot/view.m, plot/whitebg.m, plot/xlim.m,
plot/ylim.m, plot/zlim.m): Don't use explicit figure numer 1232 any more.
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Sun, 11 Sep 2011 18:48:06 +0200 |
parents | ebb42fb2da04 |
children | e81ddf9cacd5 |
line wrap: on
line diff
--- a/scripts/plot/findobj.m Sun Sep 11 18:24:58 2011 +0200 +++ b/scripts/plot/findobj.m Sun Sep 11 18:48:06 2011 +0200 @@ -244,14 +244,13 @@ endfunction %!test -%! fign = 1232; -%! hf = figure (fign, "visible", "off"); +%! hf = figure ("visible", "off"); %! unwind_protect %! l = line; %! obj = findobj (hf, "type", "line"); %! assert (l, obj); %! assert (gca, findobj (hf, "type", "axes")); -%! assert (fign, findobj (hf, "type", "figure")); +%! assert (hf, findobj (hf, "type", "figure")); %! assert (isempty (findobj (hf, "type", "xyzxyz"))); %! unwind_protect_cleanup %! close (hf);