Created
November 23, 2016 14:00
-
-
Save zoffixznet/d336de239f98d438ef8ad3578fd75023 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'); | |
do for ^nqp::elems(nqp::decont($st)) { | |
given nqp::atpos(nqp::decont($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: *+*; | |
is-deeply-junction $sum, any(any(16, 17), any(17, 18)), 'tis same'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment