Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix another .sleep deprecation
  • Loading branch information
lizmat committed Feb 20, 2015
1 parent f476a59 commit f3a8568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/advent2014-day05.t
Expand Up @@ -33,7 +33,7 @@ plan 7;
$s.act: { @seen.push: "Fizz" if $_ %% 3 }
$s.act: { @seen.push: "Buzz" if $_ %% 5 }
$s.act: { @seen.push: $_ unless $_%%3 || $_%%5 }
await do for 1..20 { start { rand.sleep; $s.emit($_) } }
await do for 1..20 { start { sleep rand; $s.emit($_) } }
is +@seen, 21, 'do we have right number of elements';
is @seen.sort,
"1 2 4 7 8 11 13 14 16 17 19 Buzz Buzz Buzz Buzz Fizz Fizz Fizz Fizz Fizz Fizz",
Expand All @@ -46,7 +46,7 @@ plan 7;
$s.act: { @seen[$_] = "Fizz" if $_ %% 3 }
$s.act: { @seen[$_] ~= "Buzz" if $_ %% 5 }
$s.act: { @seen[$_] //= $_ }
await do for 1..20 { start { rand.sleep; $s.emit($_) } }
await do for 1..20 { start { sleep rand; $s.emit($_) } }
is +@seen, 21, 'do we have right number of elements';
is @seen[1..20],
"1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz",
Expand Down

0 comments on commit f3a8568

Please sign in to comment.