]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blob - t/70-speed.t
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/IPC-MorseSignals.git] / t / 70-speed.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use utf8;
7
8 my $n;
9 use Test::More tests => 1 + ($n = 5);
10
11 use lib 't/lib';
12 use IPC::MorseSignals::TestSuite qw<bench init cleanup>;
13
14 *IPC::MorseSignals::TestSuite::diag = *Test::More::diag;
15
16 my @res;
17
18 init 2 * $n;
19
20 TODO: {
21  local $TODO = 'This is just to give you a measure of which speed you should use';
22  ok(bench(2 ** ($n - $_),  2 ** $_, \@res)) for 0 .. $n;
23 }
24
25 cleanup;
26
27 diag '=== Summary ===';
28 diag $_ for sort {
29  my ($l1, $n1) = $a =~ /(\d+)\D+(\d+)/;
30  my ($l2, $n2) = $b =~ /(\d+)\D+(\d+)/;
31  $l1 <=> $l2 || $n1 <=> $n2
32 } @res;