Mercurial > hg > octave-nkf
changeset 17683:279d4bde41d5
skewness.m: Correct %!test for "divide-by-zero"
* scripts/statistics/base/skewness.m: Turn on "divide-by-zero" warning before
starting test.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 18 Oct 2013 08:19:52 -0700 |
parents | 93e272018df2 |
children | 1d41b1910531 |
files | scripts/statistics/base/skewness.m |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/base/skewness.m +++ b/scripts/statistics/base/skewness.m @@ -148,9 +148,10 @@ %!assert (skewness (single ([1:5 10])), single (1.0513283), eps ("single")) %!assert (skewness (single ([1 2]), 0), single (NaN)) -## Verify no "division-by-zero" warnings +## Verify no "divide-by-zero" warnings %!test %! wstate = warning ("query", "Octave:divide-by-zero"); +%! warning ("on", "Octave:divide-by-zero"); %! unwind_protect %! lastwarn (""); # clear last warning %! skewness (1);