Permalink
Browse files

Added some sanity tests

  • Loading branch information...
1 parent 367b080 commit 25800bb5dac98476cc0b93c70a1d29b3771ad2ff @tadzik tadzik committed Apr 28, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 t/basic.t
View
@@ -0,0 +1,17 @@
+use Benchmark;
+use Test;
+plan 19;
+
+my $count = 1;
+
+my $code-sub = sub { ok 1 }
+my $code-str = q[use Test; ok 1];
+
+my $a = timethis(4, $code-sub); # 4 runs
+ok $a ~~ Positional;
+$a = timethis(4, $code-str); # 4 runs
+ok $a ~~ Positional;
+
+my %h = foo => $code-sub, bar => $code-str;
+$a = timethese 4, %h; # 8 runs
+ok $a ~~ Hash;

0 comments on commit 25800bb

Please sign in to comment.