11 use Benchmark qw<cmpthese :hireswallclock>;
17 eval { require Test::Tiny; 1 }
21 my $dev_null = File::Spec->devnull;
24 'Test::More' => sub { system "$^X -e 'use Test::More tests => 1; ok(1);' > $dev_null" },
25 'Test::Leaner' => sub { system "$^X -Ilib -e 'use Test::Leaner tests => 1; ok(1);' > $dev_null" },
29 $test_modules{'Test::Tiny'} = sub { system "$^X -e 'use Test::Tiny tests => 1; ok(1);' > $dev_null" },
33 cmpthese $n1, \%test_modules;
37 require Test::Builder;
40 open my $nullfh, '>', $dev_null or die "Can't open null fh: $!";
42 Test::Builder->new->output($nullfh);
43 Test::Leaner::tap_stream($nullfh);
45 Test::More::plan('no_plan');
46 Test::Leaner::plan('no_plan');
49 'Test::More' => sub { Test::More::ok(1) for 1 .. $tests },
50 'Test::Leaner' => sub { Test::Leaner::ok(1) for 1 .. $tests },
54 $test_modules{'Test::Tiny'} = sub { my $outfh = select $nullfh; Test::Tiny::ok(1) for 1 .. $tests; select $outfh },
57 print "Simple tests:\n";
58 cmpthese $n2, \%test_modules;