5 use File::Rsync::Mirror::Recentfile;
6 use File::Rsync::Mirror::Recentfile::FakeBigFloat qw(_increase_a_bit _bigfloatlt);
10 my $rf = File::Rsync::Mirror::Recentfile->new;
11 for my $x ([-12, undef],
17 my $ret = eval { $rf->interval_secs(defined $x->[0] ? $x->[0] . "s" : ()); };
24 my $rf = File::Rsync::Mirror::Recentfile->new;
25 for my $x (["12s" => 12],
31 my $ret = $rf->interval_secs ( $x->[0] );
42 ["0.99999999900000080543804870103485882282257080078125",
43 "0.9999999990000010274826536260661669075489044189453125"],
45 # the following is an interesting example because I saw this in the debugger:
46 # DB<104> x "123456789123456789.2" <=> "123456789123456790"
49 ["123456789123456789","123456789123456790"],
52 if (defined $_->[1]) {
60 my $ret = _increase_a_bit ( $x->[0], $x->[1] );
61 ok _bigfloatlt($x->[0], $ret), "L: $x->[0] < $ret";
62 if (defined $x->[1]) {
63 ok _bigfloatlt($ret, $x->[1]), "R: $ret < $x->[1]";
68 BEGIN { plan tests => $tests }
72 # cperl-indent-level: 4