Mercurial > hg > octave-nkf
changeset 10247:edfceeab945a
Add test case for empty argument in filter()
author | Thomas Weber <thomas.weber.mail@gmail.com> |
---|---|
date | Tue, 02 Feb 2010 05:03:46 -0500 |
parents | f751dae7aab8 |
children | 85d76f689236 |
files | src/ChangeLog src/DLD-FUNCTIONS/filter.cc |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-02-02 Thomas Weber <thomas.weber.mail@gmail.com> + + * DLD-FUNCTIONS/filter.cc: New tests. + 2010-02-02 John W. Eaton <jwe@octave.org> * octave.cc (octave_main): Assume we have atexit.
--- a/src/DLD-FUNCTIONS/filter.cc +++ b/src/DLD-FUNCTIONS/filter.cc @@ -735,6 +735,9 @@ %! y0 = zeros(4,4,2); y0(1:2,1:4,1) = +1; y0(1:2,1:4,2) = -1; %! y = filter(b, [1], x); %! assert(all(all(all(y==y0)))) +%! +%!assert(filter(1,ones(10,1)/10,[]), []) +%!assert(filter(1,ones(10,1)/10,zeros(0,10)), zeros(0,10)) %% Should put some tests of the "DIM" parameter in here.