Skip to content
Browse files

Add condvar test case which sends multiple items

  • Loading branch information...
1 parent 19d57b5 commit 983f74adc300cfedffc78fa263138ad0b59883d4 @am0c am0c committed Oct 30, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 t/04-condvar.t
View
8 t/04-condvar.t
@@ -1,7 +1,7 @@
use Test;
use MuEvent;
-plan 5;
+plan 7;
my $start = time;
my $plan = 1;
@@ -14,6 +14,12 @@ my $plan = 1;
{
my $cv = MuEvent::condvar;
+ ok $cv.send( 1 .. 4 ), "send";
+ ok <1 2 3 4> ~~ $cv.recv, "recv";
+}
+
+{
+ my $cv = MuEvent::condvar;
MuEvent::timer(after => 2, cb => sub {
ok $plan++ == 2 && $start+1 <= time <= $start+3, "timer occured";

0 comments on commit 983f74a

Please sign in to comment.
Something went wrong with that request. Please try again.