changeset 17904:817da22e58ed

speed.m: Change %!test blocks to %!xtest blocks. * speed.m: speed tests can fail on systems with low resolution timers. Because of this variability, make tests %!xtest blocks.
author Rik <rik@octave.org>
date Tue, 12 Nov 2013 08:43:05 -0800
parents de8591a19bc6
children c9b3951a9d6b
files scripts/testfun/speed.m
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/speed.m	Tue Nov 12 08:17:51 2013 +0100
+++ b/scripts/testfun/speed.m	Tue Nov 12 08:43:05 2013 -0800
@@ -412,7 +412,11 @@
 %! disp ("This time, the for loop is done away with entirely.");
 %! disp ("Notice how much bigger the speedup is than in example 1.");
 
-%!test
+## FIXME: Tests are known to fail on operating systems with low resolution
+##        timers such as MinGW.  Therefore, tests are made xtests so that false
+##        failures are not reported.  However, it might be better to either
+##        force the tests to do more work, or use %!testif to check the OS.
+%!xtest
 %! [order, n, T_f1, T_f2] = speed ("airy (x)", "x = rand (n, 10)", [100, 1000]);
 %! assert (isstruct (order));
 %! assert (size (order), [1, 1]);
@@ -424,8 +428,6 @@
 %! assert (isnumeric (T_f2));
 %! assert (length (T_f2) > 10);
 
-%% This test is known to fail on operating systems with low resolution timers
-%% such as MinGW
 %!xtest
 %! [order, n, T_f1, T_f2] = speed ("sum (x)", "", [100, 1000], "v = 0; for i = 1:length (x), v += x(i); endfor");
 %! assert (isstruct (order));