Skip to content

Commit

Permalink
[t/spec] Fix the arity-0 non-equal limit test to look for the correct…
Browse files Browse the repository at this point in the history
… results, and tweak the equal limit case at the same time.

git-svn-id: http://svn.pugscode.org/pugs@29921 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
colomon committed Mar 3, 2010
1 parent 028b4dc commit a5c64f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions S03-operators/series-arity0.t
Expand Up @@ -16,19 +16,19 @@ plan *;

{
my @rolls = ({ (1..2).pick } ... 2).batch(100);
ok +@rolls < 100, 'the series terminated';
ok +@rolls > 0, 'the series had at least one element...';
ok +@rolls < 100, '... and the series terminated';
is @rolls.grep(Int).elems, +@rolls, 'all the rolls are Ints';
is @rolls.grep(2).elems, 1, 'There was exactly one 2 rolled...';
is @rolls[@rolls.elems - 1], 2, '...and it was the last roll';
}

{
my @rolls = ({ (1..2).pick } ... 1.5).batch(100);
ok +@rolls < 100, 'the series terminated...';
ok +@rolls > 1, '... and the series had more than one element';
ok +@rolls > 0, 'the series had at least one element...';
ok +@rolls < 100, '... and the series terminated';
is @rolls.grep(Int).elems, +@rolls, 'all the rolls are Ints';
is @rolls.grep(@rolls[@rolls.elems - 1]).elems, 1,
'The last roll was the only roll of its number';
is @rolls.grep(@rolls[0]).elems, +@rolls, 'All the rolls are the same';
}


Expand Down

0 comments on commit a5c64f1

Please sign in to comment.