Mercurial > hg > octave-nkf
diff src/DLD-FUNCTIONS/conv2.cc @ 14607:34f067bcac12
maint: Periodic merge of stable to default
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Mon, 07 May 2012 11:59:30 -0400 |
parents | 60e5cf354d80 6980b0f35df9 |
children |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/conv2.cc +++ b/src/DLD-FUNCTIONS/conv2.cc @@ -262,9 +262,18 @@ %% Test cases from Bug #34893 %!assert (conv2 ([1:5;1:5], [1:2], "same"), [4 7 10 13 10; 4 7 10 13 10]) %!assert (conv2 ([1:5;1:5]', [1:2]', "same"), [4 7 10 13 10; 4 7 10 13 10]') -%!#assert (conv2 ([1:5;1:5], [1:2], "valid"), [4 7 10 13; 4 7 10 13]) +%!assert (conv2 ([1:5;1:5], [1:2], "valid"), [4 7 10 13; 4 7 10 13]) %!assert (conv2 ([1:5;1:5]', [1:2]', "valid"), [4 7 10 13; 4 7 10 13]') +%!test +%! rand ("seed", 42); +%! x = rand (100); +%! y = ones (5); +%! A = conv2 (x, y)(5:end-4,5:end-4); +%! B = conv2 (x, y, "valid"); +%! assert (B, A); ## Yes, this test is for *exact* equivalence. + + %% Test input validation %!error conv2 () %!error conv2 (1)