Mercurial > hg > octave-lojdl
changeset 8153:ec0a13863eb7
Only run tests that depend on HDF5 and QHull if Octave was actually
linked against these libraries.
author | Soren Hauberg <hauberg@gmail.com> |
---|---|
date | Fri, 26 Sep 2008 13:23:02 -0400 |
parents | 2b48deec1aa2 |
children | 265a821f6555 |
files | scripts/geometry/convhull.m scripts/geometry/delaunay.m scripts/geometry/delaunay3.m scripts/geometry/griddata.m scripts/geometry/griddata3.m scripts/geometry/griddatan.m test/build_sparse_tests.sh |
diffstat | 7 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/geometry/convhull.m +++ b/scripts/geometry/convhull.m @@ -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])
--- a/scripts/geometry/delaunay.m +++ b/scripts/geometry/delaunay.m @@ -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])
--- a/scripts/geometry/delaunay3.m +++ b/scripts/geometry/delaunay3.m @@ -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])
--- a/scripts/geometry/griddata.m +++ b/scripts/geometry/griddata.m @@ -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;
--- a/scripts/geometry/griddata3.m +++ b/scripts/geometry/griddata3.m @@ -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;
--- a/scripts/geometry/griddatan.m +++ b/scripts/geometry/griddatan.m @@ -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);
--- a/test/build_sparse_tests.sh +++ b/test/build_sparse_tests.sh @@ -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;