ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/09_brandon.t
Revision: 1.3
Committed: Sun Nov 30 14:34:05 2008 UTC (15 years, 6 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_51, rel-3_53, rel-3_52
Changes since 1.2: +6 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.3 BEGIN {
2     if (exists $ENV{AUTOMATED_TESTING}) {
3     print "1..0 # Skipped: Too many broken cpan tester setups.\n";
4     exit;
5     }
6     }
7 root 1.1 BEGIN { $| = 1; print "1..12\n"; }
8    
9     # a surprisingly effective test by brandon black
10    
11     no warnings;
12     use strict;
13    
14     use EV;
15    
16     {
17 root 1.2 my $a = EV::timer 1.0, 0, sub { print "not ok 2\n"; EV::unloop };
18     my $b = EV::timer 0.5, 0, sub { print "ok 2\n"; EV::unloop };
19 root 1.1
20     print "ok 1\n";
21     EV::loop;
22     print "ok 3\n";
23     }
24    
25     {
26 root 1.2 my $b = EV::timer 0.5, 0, sub { print "ok 5\n"; EV::unloop };
27     my $a = EV::timer 1.0, 0, sub { print "not ok 5\n"; EV::unloop };
28 root 1.1
29     print "ok 4\n";
30     EV::loop;
31     print "ok 6\n";
32     }
33    
34     {
35 root 1.2 my $a = EV::timer 1.5, 0, sub { print "not ok 8\n"; EV::unloop };
36     my $b = EV::timer 1.0, 0, sub { print "not ok 8\n"; EV::unloop };
37     my $c = EV::timer 0.5, 0, sub { print "ok 8\n"; EV::unloop };
38 root 1.1
39     print "ok 7\n";
40     EV::loop;
41     print "ok 9\n";
42     }
43     {
44    
45 root 1.2 my $a = EV::timer 1.0, 0, sub { print "not ok 11\n"; EV::unloop };
46     my $b = EV::timer 0.5, 0, sub { print "ok 11\n"; EV::unloop };
47     my $c = EV::timer 1.5, 0, sub { print "not ok 11\n"; EV::unloop };
48 root 1.1
49     print "ok 10\n";
50     EV::loop;
51     print "ok 12\n";
52     }