Skip to content

Commit

Permalink
Test an untested method in Any-iterable-methods.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Sep 8, 2016
1 parent fb22ba6 commit ced5101
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S32-hash/map.t
@@ -1,12 +1,18 @@
use v6;
use Test;
plan 2;
plan 3;

{
my %hash = :foo, :42bar;
is-deeply %hash.Map, Map.new( (:foo, :42bar) ),
'.Map on defined Hash produces correct Map';
is-deeply Hash.Map, Map, '.Map on undefined Hash produces Map type object';
throws-like(
{ %hash.map(Hash) },
X::AdHoc,
message => /"Cannot map a {%hash.WHAT.perl} to a Hash."/,
'<object|type>.map(Hash) should die'
);
}

# vim: ft=perl6

0 comments on commit ced5101

Please sign in to comment.