function ok = delft3d_io_xyz_test
%DELFT3D_IO_XYZ_TEST tets for delft3d_io_xyz
%
% OK = delft3d_io_xyz_test()
%
%See also: delft3d_io_xyz

[x,y,z]=peaks;
x = x(:);
y = y(:);
z = z(:);

fname = tempname;

           delft3d_io_xyz('write',fname,x,y,z)
[x2,y2,z2]=delft3d_io_xyz('read' ,fname);

delete(fname)

myeps = 1e-6;

OK(1) = max(abs(x - x2)) < myeps;
OK(2) = max(abs(y - y2)) < myeps;
OK(3) = max(abs(z - z2)) < myeps;

ok = all(OK);
