# HG changeset patch # User Soren Hauberg # Date 1222449782 14400 # Node ID ec0a13863eb7aa777d20ec8d6f73af2eb6099706 # Parent 2b48deec1aa2e0a0c54e6516396a2892744e2718 Only run tests that depend on HDF5 and QHull if Octave was actually linked against these libraries. diff -r 2b48deec1aa2 -r ec0a13863eb7 scripts/geometry/convhull.m --- a/scripts/geometry/convhull.m Fri Sep 26 13:18:13 2008 -0400 +++ b/scripts/geometry/convhull.m Fri Sep 26 13:23:02 2008 -0400 @@ -73,7 +73,7 @@ H(n + 1) = H(1); endfunction -%!test +%!testif HAVE_QHULL %! x = -3:0.5:3; %! y = abs (sin (x)); %! assert (convhull (x, y, {"s","Qci","Tcv","Pp"}), [1;7;13;12;11;10;4;3;2;1]) diff -r 2b48deec1aa2 -r ec0a13863eb7 scripts/geometry/delaunay.m --- a/scripts/geometry/delaunay.m Fri Sep 26 13:18:13 2008 -0400 +++ b/scripts/geometry/delaunay.m Fri Sep 26 13:23:02 2008 -0400 @@ -73,7 +73,7 @@ endif endfunction -%!test +%!testif HAVE_QHULL %! x = [-1, 0, 1, 0, 0]; %! y = [0, 1, 0, -1, 0]; %! assert (sortrows (sort (delaunay (x, y), 2)), [1,2,5;1,4,5;2,3,5;3,4,5]) diff -r 2b48deec1aa2 -r ec0a13863eb7 scripts/geometry/delaunay3.m --- a/scripts/geometry/delaunay3.m Fri Sep 26 13:18:13 2008 -0400 +++ b/scripts/geometry/delaunay3.m Fri Sep 26 13:23:02 2008 -0400 @@ -52,7 +52,7 @@ endfunction -%!test +%!testif HAVE_QHULL %! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1]; %! assert (sortrows (sort (delaunay3 (x, y, z), 2)), [1,2,3,4;1,2,4,5]) diff -r 2b48deec1aa2 -r ec0a13863eb7 scripts/geometry/griddata.m --- a/scripts/geometry/griddata.m Fri Sep 26 13:18:13 2008 -0400 +++ b/scripts/geometry/griddata.m Fri Sep 26 13:23:02 2008 -0400 @@ -125,7 +125,7 @@ endif endfunction -%!test +%!testif HAVE_QHULL %! [xx,yy]=meshgrid(linspace(-1,1,32)); %! x = xx(:); %! x = x + 10 * (2 * round(rand(size(x))) - 1) * eps; diff -r 2b48deec1aa2 -r ec0a13863eb7 scripts/geometry/griddata3.m --- a/scripts/geometry/griddata3.m Fri Sep 26 13:18:13 2008 -0400 +++ b/scripts/geometry/griddata3.m Fri Sep 26 13:23:02 2008 -0400 @@ -55,7 +55,7 @@ vi = reshape (vi, size (xi)); endfunction -%!test +%!testif HAVE_QHULL %! rand('state', 0); %! x = 2 * rand(1000, 1) - 1; %! y = 2 * rand(1000, 1) - 1; @@ -67,7 +67,7 @@ %! vv = vi - xi.^2 - yi.^2 - zi.^2; %! assert (max(abs(vv(:))), 0, 0.1) -%!test +%!testif HAVE_QHULL %! rand('state', 0); %! x = 2 * rand(1000, 1) - 1; %! y = 2 * rand(1000, 1) - 1; diff -r 2b48deec1aa2 -r ec0a13863eb7 scripts/geometry/griddatan.m --- a/scripts/geometry/griddatan.m Fri Sep 26 13:18:13 2008 -0400 +++ b/scripts/geometry/griddatan.m Fri Sep 26 13:23:02 2008 -0400 @@ -85,7 +85,7 @@ endfunction -%!test +%!testif HAVE_QHULL %! [xx,yy] = meshgrid(linspace(-1,1,32)); %! xi = [xx(:), yy(:)]; %! x = (2 * rand(100,2) - 1); @@ -95,7 +95,7 @@ %! zz2 = griddata(x(:,1),x(:,2),y,xi(:,1),xi(:,2),'linear'); %! assert (zz, zz2, 1e-10) -%!test +%!testif HAVE_QHULL %! [xx,yy] = meshgrid(linspace(-1,1,32)); %! xi = [xx(:), yy(:)]; %! x = (2 * rand(100,2) - 1); diff -r 2b48deec1aa2 -r ec0a13863eb7 test/build_sparse_tests.sh --- a/test/build_sparse_tests.sh Fri Sep 26 13:18:13 2008 -0400 +++ b/test/build_sparse_tests.sh Fri Sep 26 13:23:02 2008 -0400 @@ -879,7 +879,7 @@ %! load(savefile,"as_save"); %! unlink(savefile); %! assert(as_save,sparse(af)); -%!test # save hdf5 +%!testif HAVE_HDF5 # save hdf5 %! savefile= tmpnam(); %! as_save=as; save("-hdf5",savefile,"bf","as_save","af"); %! clear as_save;