X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FBenchmark.t;h=3a7a1def8597a96bcb6a567ea9fdb6c82f1cd9dd;hb=e82b93481bc82235f35444c372503cc96abe405b;hp=8081476785797882fcd533a9d2bb42cb039a38a2;hpb=53aa2791f2814657eac3bbbec321e82f3209ae86;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Benchmark.t b/lib/Benchmark.t index 8081476..3a7a1de 100644 --- a/lib/Benchmark.t +++ b/lib/Benchmark.t @@ -8,7 +8,7 @@ BEGIN { use warnings; use strict; use vars qw($foo $bar $baz $ballast); -use Test::More tests => 193; +use Test::More tests => 194; use Benchmark qw(:all); @@ -42,6 +42,11 @@ is ($foo, 5, "benchmarked code was run 5 times"); isa_ok(timeit(5, '++$bar'), 'Benchmark', "timeit eval"); is ($bar, 5, "benchmarked code was run 5 times"); +# is coderef called with spurious arguments? +timeit( 1, sub { $foo = @_ }); +is ($foo, 0, "benchmarked code called without arguments"); + + print "# Burning CPU to benchmark things will take time...\n";