changeset 17605:8f2f8c9b2620

skewness.m: Backout cset a13ff4521538 until fix for bug #40199 is found. * scripts/statistics/base/skewness.m: Don't use warning(..., "local") syntax.
author Rik <rik@octave.org>
date Tue, 08 Oct 2013 10:57:28 -0700
parents 4975ccb0a916
children b43da3876b64
files scripts/statistics/base/skewness.m
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/statistics/base/skewness.m	Tue Oct 08 10:55:08 2013 -0700
+++ b/scripts/statistics/base/skewness.m	Tue Oct 08 10:57:28 2013 -0700
@@ -148,12 +148,16 @@
 %!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
 %!test
-%! ## Verify no "division-by-zero" warnings
-%! warning ("on", "Octave:divide-by-zero", "local");
-%! lastwarn ("");  # clear last warning
-%! skewness (1);
-%! assert (lastwarn (), "");
+%! wstate = warning ("query", "Octave:divide-by-zero");
+%! unwind_protect
+%!   lastwarn ("");  # clear last warning
+%!   skewness (1);
+%!   assert (lastwarn (), "");
+%! unwind_protect_cleanup
+%!   warning (wstate, "Octave:divide-by-zero");
+%! end_unwind_protect
 
 ## Test input validation
 %!error skewness ()