Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from tadzik/master

Fixes under nom and more tests
  • Loading branch information...
commit 1e2749e5a608fa36738b5bdb6c46116d2ce724d3 2 parents e490e19 + 5dc77a1
@perlpilot authored
Showing with 6 additions and 2 deletions.
  1. +1 −1  lib/Benchmark.pm6
  2. +5 −1 t/basic.t
View
2  lib/Benchmark.pm6
@@ -10,7 +10,7 @@ my sub time_it (Int $count where { $_ > 0 }, Code $code) {
}
multi sub timethis (Int $count, Str $code) is export {
- my $routine = eval "sub \{ $code \}";
+ my $routine = { eval $code };
return time_it($count, $routine);
}
View
6 t/basic.t
@@ -1,6 +1,6 @@
use Benchmark;
use Test;
-plan 19;
+plan 23;
my $count = 1;
@@ -15,3 +15,7 @@ ok $a ~~ Positional;
my %h = foo => $code-sub, bar => $code-str;
$a = timethese 4, %h; # 8 runs
ok $a ~~ Hash;
+ok $a.exists: 'foo';
+ok $a.exists: 'bar';
+ok $a<foo> ~~ Positional;
+ok $a<bar> ~~ Positional;
Please sign in to comment.
Something went wrong with that request. Please try again.