changeset 9835:122d82315308 octave-forge

geometry: suppresing graphical output from tests
author jpicarbajal
date Sat, 24 Mar 2012 11:11:08 +0000
parents 648d10dd8b02
children e07cabf3ae13
files main/geometry/inst/geom2d/drawLine.m
diffstat 1 files changed, 11 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/main/geometry/inst/geom2d/drawLine.m	Sat Mar 24 10:24:19 2012 +0000
+++ b/main/geometry/inst/geom2d/drawLine.m	Sat Mar 24 11:11:08 2012 +0000
@@ -91,7 +91,7 @@
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [30 40 10 0];
 %!  edge = [0 40 100 40];
@@ -99,12 +99,11 @@
 %!  assertElementsAlmostEqual(edge([1 3]), get(hl, 'xdata'));
 %!  assertElementsAlmostEqual(edge([2 4]), get(hl, 'ydata'));
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [30 40 -10 0];
 %!  edge = [100 40 0 40];
@@ -112,23 +111,21 @@
 %!  assertElementsAlmostEqual(edge([1 3]), get(hl, 'xdata'));
 %!  assertElementsAlmostEqual(edge([2 4]), get(hl, 'ydata'));
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [30 140 10 0];
 %!  hl = drawLine(line);
 %!  assertEqual(-1, hl);
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [30 40 0 10];
 %!  edge = [30 0 30 100];
@@ -136,12 +133,11 @@
 %!  assertElementsAlmostEqual(edge([1 3]), get(hl, 'xdata'));
 %!  assertElementsAlmostEqual(edge([2 4]), get(hl, 'ydata'));
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [30 40 0 -10];
 %!  edge = [30 100 30 0];
@@ -149,23 +145,21 @@
 %!  assertElementsAlmostEqual(edge([1 3]), get(hl, 'xdata'));
 %!  assertElementsAlmostEqual(edge([2 4]), get(hl, 'ydata'));
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [140 30 0 10];
 %!  hl = drawLine(line);
 %!  assertEqual(-1, hl);
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [80 30 10 10];
 %!  edge = [50 0 100 50];
@@ -173,12 +167,11 @@
 %!  assertElementsAlmostEqual(edge([1 3]), get(hl, 'xdata'));
 %!  assertElementsAlmostEqual(edge([2 4]), get(hl, 'ydata'));
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [20 70 10 10];
 %!  edge = [0 50 50 100];
@@ -186,12 +179,11 @@
 %!  assertElementsAlmostEqual(edge([1 3]), get(hl, 'xdata'));
 %!  assertElementsAlmostEqual(edge([2 4]), get(hl, 'ydata'));
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [140 -30 10 10];
 %!  hl = drawLine(line);
@@ -200,12 +192,11 @@
 %!  hl = drawLine(line);
 %!  assertEqual(-1, hl);
 %!  rmpath (privpath);
-%! close all
 
 %!test
 %!  addpath (privpath,'-end')
 %!  box = [0 100 0 100];
-%!  hf = figure();
+%!  hf = figure('visible','off');
 %!  axis(box);
 %!  line = [...
 %!      80 30 10 10; ...
@@ -224,4 +215,4 @@
 %!  assertEqual(-1, hl(3));
 %!  assertEqual(-1, hl(4));
 %!  rmpath (privpath);
-%! close all
+