Skip to content

Commit d1fe0c9

Browse files
committed
Chase anyof/allof semantic changes.
1 parent 03e62e2 commit d1fe0c9

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

S17-promise/allof.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ plan 12;
2525
my $pall = Promise.allof(@p);
2626
@p[0].keep(1);
2727
@p[1].break("danger danger");
28-
dies-ok { $pall.result }, "result on broken all-Promise throws";
29-
is $pall.status, Broken, "all-Promise was broken";
28+
lives-ok { $pall.result }, "result on broken all-Promise does not throw";
29+
is $pall.status, Kept, "all-Promise was kept";
3030
}
3131

3232
{

S17-promise/anyof.t

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 10;
4+
plan 9;
55

66
{
77
my $p1 = Promise.new;
@@ -24,12 +24,11 @@ plan 10;
2424
my $pany = Promise.anyof($p1, $p2);
2525

2626
$p2.break("oh noes");
27-
dies-ok { $pany.result }, "Getting result of broken anyof dies";
28-
is $pany.status, Broken, "Promise was broken";
29-
is $pany.cause.message, "oh noes", "breakage reason conveyed";
27+
lives-ok { $pany.result }, "Getting result of anyof where on Promise broke lives";
28+
is $pany.status, Kept, "Promise from anyof was kept";
3029

3130
$p1.keep(1);
32-
is $pany.status, Broken, "Other promise keeping doesn't affect status";
31+
is $pany.status, Kept, "Other promise keeping doesn't affect status";
3332
}
3433

3534
throws-like { Promise.anyof(42) }, X::Promise::Combinator;

0 commit comments

Comments
 (0)