-
-
Save zoffixznet/0dbeeaa1a34d424f1f673d9a85b5ec90 to your computer and use it in GitHub Desktop.
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
subtest 'list, hash, pair, produce right things with itemized args' => { | |
my $list = 1, 2, 3; | |
my $arr = [1, 2, 3]; | |
my $hash = {:42foo, :70bar}; | |
my $map = Map.new: (:42foo, :70bar); | |
my $pair = :42foo; | |
is-deeply @$list, $list, '@$list'; | |
is-deeply @$arr, $arr, '@$arr'; | |
is-deeply (@$hash).sort, $hash.list.sort, '@$hash'; | |
is-deeply (@$map ).sort, $map .list.sort, '@$map'; | |
is-deeply @$pair, $pair.list, '@$pair'; | |
is-deeply list($list), $list, 'list($list)'; | |
is-deeply list($arr), $arr, 'list($arr)'; | |
is-deeply list($hash).sort, $hash.list.sort, 'list($hash)'; | |
is-deeply list($map ).sort, $map .list.sort, 'list($map)'; | |
is-deeply list($pair), $pair.list, 'list($pair)'; | |
is-deeply %$list, $list.hash, '%$list'; | |
is-deeply %$arr, $arr .hash, '%$arr'; | |
is-deeply %$hash, $hash, '%$hash'; | |
is-deeply %$map, $map, '%$map'; | |
is-deeply %$pair, $pair.hash, '%$pair'; | |
is-deeply hash($list), $list.hash, 'hash($list)'; | |
is-deeply hash($arr), $arr .hash, 'hash($arr)'; | |
is-deeply hash($hash), $hash, 'hash($hash)'; | |
is-deeply hash($map), $map, 'hash($map)'; | |
is-deeply hash($pair), $pair.hash, 'hash($pair)'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment