Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add some Parcel.new tests
  • Loading branch information
lizmat committed Oct 2, 2014
1 parent c7afefb commit 4bc5f70
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S02-types/parcel.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 48;
plan 52;

isa_ok (5, 7, 8), Parcel, '(5, 7, 8) is Parcel';
is +(5, 7, 8), 3, 'prefix:<+> on a Parcel';
Expand Down Expand Up @@ -87,4 +87,14 @@ is $(;).elems, 0, '$(;) parses, and is empty';
cmp_ok (my $x3=42,1), '===', (my $y2:=$x3,1), '$x3=42,1 ==== $y2 := $x3,1';
} #4

{
my $p = Parcel.new( <a b c> );
is $p.elems, 1, 'did we get the list';
is $p, <a b c>, 'did we get what we put in';

$p = Parcel.new( 'a','b','c' );
is $p.elems, 3, 'did we get the parameters';
is $p, <a b c>, 'did we get what we put in';
} #4

# vim: ft=perl6

0 comments on commit 4bc5f70

Please sign in to comment.