File: 09_brandon.t

package info (click to toggle)
libev-perl 4.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 972 kB
  • sloc: ansic: 7,055; perl: 53; makefile: 10
file content (52 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
BEGIN {
   if (exists $ENV{AUTOMATED_TESTING}) {
      print "1..0 # Skipped: Too many broken cpan tester setups.\n";
      exit;
   }
}
BEGIN { $| = 1; print "1..12\n"; }

# a surprisingly effective test by brandon black

no warnings;
use strict;

use EV;

{
   my $a = EV::timer 1.6, 0, sub { print "not ok 2\n"; EV::break };
   my $b = EV::timer 0.3, 0, sub { print "ok 2\n"; EV::break };

   print "ok 1\n";
   EV::run;
   print "ok 3\n";
}

{
   my $b = EV::timer 0.3, 0, sub { print "ok 5\n"; EV::break };
   my $a = EV::timer 1.6, 0, sub { print "not ok 5\n"; EV::break };

   print "ok 4\n";
   EV::run;
   print "ok 6\n";
}

{
   my $a = EV::timer 1.9, 0, sub { print "not ok 8\n"; EV::break };
   my $b = EV::timer 1.6, 0, sub { print "not ok 8\n"; EV::break };
   my $c = EV::timer 0.3, 0, sub { print "ok 8\n"; EV::break };

   print "ok 7\n";
   EV::run;
   print "ok 9\n";
}
{

   my $a = EV::timer 1.6, 0, sub { print "not ok 11\n"; EV::break };
   my $b = EV::timer 0.3, 0, sub { print "ok 11\n"; EV::break };
   my $c = EV::timer 1.9, 0, sub { print "not ok 11\n"; EV::break };

   print "ok 10\n";
   EV::run;
   print "ok 12\n";
}