Mercurial > hg > octave-image
changeset 809:c8354d61ecaa
bwlabeln: added some more tests comparing results with bwlabel().
author | Carnë Draug <carandraug@octave.org> |
---|---|
date | Thu, 17 Oct 2013 04:03:38 +0100 |
parents | 71c15a64a05c |
children | b059579d8d41 |
files | src/bwlabeln.cc |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bwlabeln.cc +++ b/src/bwlabeln.cc @@ -733,6 +733,13 @@ } /* +%!shared in +%! in = rand (10) > 0.8; +%!assert (bwlabel (in, 4), bwlabeln (in, 4)); +%!assert (bwlabel (in, 4), bwlabeln (in, [0 1 0; 1 0 1; 0 1 0])); +%!assert (bwlabel (in, 8), bwlabeln (in, 8)); +%!assert (bwlabel (in, 8), bwlabeln (in, [1 1 1; 1 0 1; 1 1 1])); + %!assert (bwlabel (logical ([0 1 0; 0 0 0; 1 0 1])), [0 2 0; 0 0 0; 1 0 3]); %!assert (bwlabel ([0 1 0; 0 0 0; 1 0 1]), [0 2 0; 0 0 0; 1 0 3]);