Revision: 1219 Author: [email protected] Date: Fri May 7 02:02:30 2010 Log: Don't bother checking for >0 time for t/10-run.t as it's not reliable. Also restore its role as a regression test for RT#50851
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1219 Modified: /trunk/t/10-run.t ======================================= --- /trunk/t/10-run.t Fri Apr 23 05:27:23 2010 +++ /trunk/t/10-run.t Fri May 7 02:02:30 2010 @@ -8,21 +8,20 @@ use Devel::NYTProf::Run qw(profile_this); -my $n = 10_000; +# tiny amount of source code to exercise RT#50851 my @src = ( - "1+1 for (1..$n);\n", - "2+2 for (1..$n);\n", + "1+1;\n", + "2+2;\n", ); run_test_group( { extra_options => { }, - extra_test_count => 18, + extra_test_count => 17, extra_test_code => sub { my ($profile, $env) = @_; $profile = profile_this( - # tiny amount of source code to exercise RT#50851 src_code => join('', @src), out_file => $env->{file}, skip_sitecustomize => 1, @@ -50,10 +49,9 @@ my $line_time_data = $fi->line_time_data; is ref $line_time_data, 'ARRAY'; - is $fi->sum_of_stmts_count, 4; - - # XXX these timings will probably cause test failures - cmp_ok $fi->sum_of_stmts_time, '>', 0; - cmp_ok $fi->sum_of_stmts_time, '<', 10; # should be tiny + is $fi->sum_of_stmts_count, 2; + + # should be tiny (will be 0 on systems without a highres clock) + cmp_ok $fi->sum_of_stmts_time, '<', 10; }, }); -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected]
