Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test an untested method in Any-iterable-methods.pm
- Loading branch information
1 parent
fb22ba6
commit ced5101
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |