Created
November 23, 2016 13:58
-
-
Save zoffixznet/27fc3c595c87614f86ab60127f015037 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; | |
use MONKEY-GUTS; | |
sub is-deeply-junction ( | |
Junction $got, Junction $expected, Str:D $desc | |
) is export { | |
sub junction-guts (Junction $j) { | |
my $st = nqp::getattr(nqp::decont($j), Junction, '$!storage'); | |
dd $st.^name; | |
do for ^$st.elems { | |
given $st[$_] { | |
when Junction { junction-guts($_).Slip } | |
$_ | |
} | |
} | |
} | |
is-deeply junction-guts($got), junction-guts($expected), $desc; | |
} | |
constant @a = (2, 3|4, 5, 6|7); | |
my $sum = @a.reduce: *+*; | |
# dd $sum; | |
is-deeply-junction any(any(16, 17), any(17, 18)), $sum, 'tis same'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment