File: 05_priority.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 (19 lines) | stat: -rw-r--r-- 719 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
BEGIN { $| = 1; print "1..9\n"; }

no warnings;
use strict;

use EV;

my $t0 = EV::timer -1, 0, sub { print "ok 4\n" };
my $t_ = EV::timer -1, 0, sub { print "ok 5\n" }; $t_->priority (-1);
my $t1 = EV::timer -1, 0, sub { print "ok 3\n" }; $t1->priority ( 1);

my $i2 = EV::idle sub { print EV::iteration == 1 ? "" : "not ", "ok 2\n"; $_[0]->stop }; $i2->priority (10);
my $i0 = EV::idle sub { print EV::iteration == 3 ? "" : "not ", "ok 7\n"; $_[0]->stop };
my $i1 = EV::idle sub { print EV::iteration == 2 ? "" : "not ", "ok 6\n"; $_[0]->stop }; $i1->priority ( 1);
my $i_ = EV::idle sub { print EV::iteration == 4 ? "" : "not ", "ok 8\n"; $_[0]->stop }; $i_->priority (-1);

print "ok 1\n";
EV::run;
print "ok 9\n";