comparison scripts/plot/util/findobj.m @ 20524:ba4088aee342

findobj.m: Stop requiring gnuplot in BIST tests (bug #36983). * findobj.m: Remove explicit code to set toolkit to gnuplot and restore existing toolkit at end of BIST test.
author Rik <rik@octave.org>
date Sun, 13 Sep 2015 14:47:58 -0700
parents 83792dd9bcc1
children
comparison
equal deleted inserted replaced
20523:a142b62527ef 20524:ba4088aee342
339 %! unwind_protect_cleanup 339 %! unwind_protect_cleanup
340 %! close (hf); 340 %! close (hf);
341 %! end_unwind_protect 341 %! end_unwind_protect
342 342
343 %!test 343 %!test
344 %! toolkit = graphics_toolkit ("gnuplot");
345 %! hf = figure ("visible", "off"); 344 %! hf = figure ("visible", "off");
346 %! unwind_protect 345 %! unwind_protect
347 %! h1 = subplot (2,2,1); 346 %! h1 = subplot (2,2,1);
348 %! h2 = subplot (2,2,2); 347 %! h2 = subplot (2,2,2);
349 %! h3 = subplot (2,2,3, "userdata", struct ("foo", "bar")); 348 %! h3 = subplot (2,2,3, "userdata", struct ("foo", "bar"));
350 %! h4 = subplot (2,2,4); 349 %! h4 = subplot (2,2,4);
351 %! h = findobj (hf, "userdata", struct ("foo", "bar")); 350 %! h = findobj (hf, "userdata", struct ("foo", "bar"));
352 %! assert (h, h3); 351 %! assert (h, h3);
353 %! unwind_protect_cleanup 352 %! unwind_protect_cleanup
354 %! close (hf); 353 %! close (hf);
355 %! graphics_toolkit (toolkit); 354 %! end_unwind_protect
356 %! end_unwind_protect 355
357 356 %!test
358 %!test
359 %! toolkit = graphics_toolkit ("gnuplot");
360 %! hf = figure ("visible", "off"); 357 %! hf = figure ("visible", "off");
361 %! unwind_protect 358 %! unwind_protect
362 %! h1 = subplot (2,2,1, "tag", "1"); 359 %! h1 = subplot (2,2,1, "tag", "1");
363 %! h2 = subplot (2,2,2, "tag", "2"); 360 %! h2 = subplot (2,2,2, "tag", "2");
364 %! h3 = subplot (2,2,3, "tag", "3"); 361 %! h3 = subplot (2,2,3, "tag", "3");
365 %! h4 = subplot (2,2,4, "tag", "4"); 362 %! h4 = subplot (2,2,4, "tag", "4");
366 %! h = findobj (hf, "type", "axes", "-not", "tag", "1"); 363 %! h = findobj (hf, "type", "axes", "-not", "tag", "1");
367 %! assert (h, [h4; h3; h2]) 364 %! assert (h, [h4; h3; h2])
368 %! unwind_protect_cleanup 365 %! unwind_protect_cleanup
369 %! close (hf); 366 %! close (hf);
370 %! graphics_toolkit (toolkit);
371 %! end_unwind_protect 367 %! end_unwind_protect
372 368
373 %!test 369 %!test
374 %! hf = figure ("visible", "off"); 370 %! hf = figure ("visible", "off");
375 %! unwind_protect 371 %! unwind_protect