Skip to content

Commit

Permalink
Spec .pairup always returns a Seq
Browse files Browse the repository at this point in the history
Modified test is a 6.d propspec
PoV: rakudo/rakudo@d73272e4c0
  • Loading branch information
zoffixznet committed Oct 29, 2018
1 parent 9e4d81d commit 6f96547
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions S32-basics/pairup.t
Expand Up @@ -3,11 +3,13 @@ use lib $?FILE.IO.parent(2).add: 'packages';
use Test;
use Test::Util;

plan 5;
plan 6;

{
is-eqv Any.pairup, (), 'pairup on a :U invocant returns an empty List';
my @nums = 1..6;
is-eqv Any.pairup, ().Seq, 'pairup on a :U invocant returns an empty Seq';
is-eqv @nums.pairup, (1 => 2, 3 => 4, 5 => 6).Seq,
'pairup on a :D invocant';
my %h = @nums.pairup;
is(@nums.pairup.elems, 3, 'pairup returns correct list size');
is-deeply(%h.keys.sort, ('1', '3', '5'), 'hash constructed from pairup has correct keys');
Expand Down

0 comments on commit 6f96547

Please sign in to comment.