-
-
Save AlexDaniel/8262b1638945378d6f7f3fa7ce017217 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
use Test; | |
plan 6; | |
my %data = :a(1), :b(2), :c(3); | |
{ | |
sub demo (%positional, :$named) | |
{ | |
state %state = %positional; | |
is-deeply %state, %positional, 'sub demo(%positional, :$named)'; | |
} | |
demo(%data); | |
} | |
{ | |
multi demo (%positional, :$named) | |
{ | |
state %state = %positional; | |
is-deeply %state, %positional, 'multi demo(%positional, :$named)'; | |
} | |
demo(%data); | |
} | |
{ | |
sub demo (%positional) | |
{ | |
state %state = %positional; | |
is-deeply %state, %positional, 'sub demo(%positional)'; | |
} | |
demo(%data); | |
} | |
{ | |
multi demo (%positional) | |
{ | |
state %state = %positional; | |
is-deeply %state, %positional, 'multi demo(%positional)'; | |
} | |
demo(%data); | |
} | |
{ | |
sub demo (%positional, :$named) | |
{{ | |
state %state = %positional; | |
is-deeply %state, %positional, 'sub demo(%positional, :$named) {{...}}'; | |
}} | |
demo(%data); | |
} | |
{ | |
multi demo (%positional, :$named) | |
{{ | |
state %state = %positional; | |
is-deeply %state, %positional, 'multi demo(%positional, :$named) {{...}}'; | |
}} | |
demo(%data); | |
} | |
done-testing; | |
=finish | |
{ | |
multi demo (%positional, :$named) | |
{{ | |
state %state = %positional; | |
dd 'multi{{}}', %positional, %state, '_' x 50; | |
}} | |
my %data = :a(1), :b(2), :c(3); | |
demo(%data); | |
demo(%data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment