Skip to content

Commit

Permalink
S29-array/shift.t, S29-array/pop.t:
Browse files Browse the repository at this point in the history
* Remove some more #?rakudo skip lines
* Remove some trailing spaces


git-svn-id: http://svn.pugscode.org/pugs@20695 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
pmichaud committed Jun 7, 2008
1 parent 10a57fe commit 91b701a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 6 additions & 8 deletions S29-array/pop.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use Test;

# L<S29/"Array"/"=item pop">

=begin description
=begin description
Pop tests
=end description
=end description

plan 27;

Expand Down Expand Up @@ -41,9 +41,7 @@ plan 27;
is(pop(@pop), 4, 'inline pop(@pop) works');

is(+@pop, 3, 'we have 3 elements in the array');
#?rakudo skip 'arity trouble'
is(pop @pop, 3, 'inline pop @pop works');
#?rakudo emit pop @pop;

is(+@pop, 2, 'we have 2 elements in the array');
is(@pop.pop(), 2, 'inline @pop.pop() works');
Expand All @@ -58,7 +56,7 @@ plan 27;
# invocant syntax with inline arrays
{
is([1, 2, 3].pop, 3, 'this will return 3');
ok(!defined([].pop), 'this will return undef');
ok(!defined([].pop), 'this will return undef');
}

# some edge cases
Expand All @@ -71,9 +69,9 @@ plan 27;
# testing some error cases
{
my @pop = 1 .. 5;
dies_ok({ pop() }, 'pop() requires arguments');
dies_ok({ pop(@pop, 10) }, 'pop() should not allow extra arguments');
dies_ok({ @pop.pop(10) }, 'pop() should not allow extra arguments');
dies_ok({ pop() }, 'pop() requires arguments');
dies_ok({ pop(@pop, 10) }, 'pop() should not allow extra arguments');
dies_ok({ @pop.pop(10) }, 'pop() should not allow extra arguments');
dies_ok({ 42.pop }, '.pop should not work on scalars');
}

Expand Down
2 changes: 0 additions & 2 deletions S29-array/shift.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ plan 27;
is(shift(@shift), 1, 'inline shift(@shift) works');

is(+@shift, 3, 'we have 3 elements in our array');
#?rakudo skip 'arity trouble'
is(shift @shift, 2, 'inline shift @shift works');
#?rakudo emit shift @shift;

is(+@shift, 2, 'we have 2 elements in our array');
is(@shift.shift(), 3, 'inline @shift.shift() works');
Expand Down

0 comments on commit 91b701a

Please sign in to comment.