Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spec WhateverCode.assuming
Covers R#1735: rakudo/rakudo#1735
Rakudo fix: rakudo/rakudo@6e8dc6f132
  • Loading branch information
zoffixznet committed Apr 14, 2018
1 parent 555e1f6 commit 5bfe416
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S02-types/whatever.t
Expand Up @@ -5,7 +5,7 @@ use lib $?FILE.IO.parent(2).add("packages");
use Test;
use Test::Util;

plan 128;
plan 129;

# L<S02/The Whatever Object/"The * character as a standalone term captures the notion of">
# L<S02/Native types/"If any native type is explicitly initialized to">
Expand Down Expand Up @@ -499,4 +499,13 @@ subtest 'can curry chains with .& calls on them' => {
'FOOonetwO', 'method, .&(2args), method, .& with whatever curry, .&sub';
}

subtest 'can .assuming with WhateverCode' => {
plan 4;
is-deeply ((*.flip)).assuming(42)(), '24', '1-param, 1 assumed';
is-deeply ((* + *)).assuming(42)(3), 45, '2-param, 1 assumed';
is-deeply ((* + *)).assuming(42, 5)(), 47, '2-param, 2 assumed';
is-deeply ((* + * + *.flip + *.abs)).assuming(42, 5)(123, -50), 418,
'5-params with nested calls, 2 assumed';
}

# vim: ft=perl6

0 comments on commit 5bfe416

Please sign in to comment.