Mercurial > hg > octave-lyh
diff scripts/plot/findobj.m @ 16900:434a0b29ab12
Add xtest for findobj() for pecedence of logical operations.
* scripts/plot/findobj.m: Add xtest to indicate logical operations do not
respect precedence.
While adding the test, remove "drawnow()" from earlier tests.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Fri, 05 Jul 2013 07:12:18 -0400 |
parents | 21d5e76891fe |
children | 562301c71bd3 |
line wrap: on
line diff
--- a/scripts/plot/findobj.m +++ b/scripts/plot/findobj.m @@ -318,7 +318,6 @@ %! set (h3, 'tag', '3') %! h4 = subplot (2, 2, 4); %! set (h4, 'tag', '4') -%! drawnow () %! h = findobj (hf, 'type', 'axes', '-not', 'tag', '1'); %! unwind_protect_cleanup %! close (hf); @@ -336,7 +335,6 @@ %! set (h3, 'userdata', struct ('column', 1, 'row', 2)); %! h4 = subplot (2, 2, 4); %! set (h4, 'userdata', struct ('column', 2, 'row', 2)); -%! drawnow () %! h = findobj (hf, 'type', 'axes', '-not', 'userdata', ... %! struct ('column', 1, 'row', 1)); %! unwind_protect_cleanup @@ -344,3 +342,16 @@ %! end_unwind_protect %! assert (h, [h2; h3; h4]) +%!xtest +%! hf = figure ("visible", "off"); +%! unwind_protect +%! ha = axes (); +%! plot (1:10); +%! h = findobj (hf, 'type', 'figure', ... +%! '-or', 'parent', 1, ... +%! '-and', 'type', 'axes') +%! unwind_protect_cleanup +%! close (hf) +%! end_unwind_protect +%! assert (h, [hf; ha]) +