Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure we don't get "out of order" errors
  • Loading branch information
lizmat committed May 11, 2014
1 parent e8ed156 commit 4d4e22d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions S17-promise/start.t
Expand Up @@ -8,6 +8,7 @@ plan 12;
pass "Promise.start actually runs";
42
});
sleep 1;
isa_ok $p, Promise, '.start gives a Promise';
is $p.result, 42, "Correct result";
is $p.status, Kept, "Promise was kept";
Expand All @@ -18,6 +19,7 @@ plan 12;
pass "Promise.start actually runs";
42
};
sleep 1;
isa_ok $p, Promise, 'start {} gives a Promise';
is $p.result, 42, "Correct result";
is $p.status, Kept, "Promise was kept";
Expand All @@ -28,6 +30,7 @@ plan 12;
pass "Promise.start actually runs";
die "trying";
});
sleep 1;
dies_ok { $p.result }, "result throws exception";
is $p.status, Broken, "Promise was broken";
is $p.cause.message, "trying", "Correct exception stored";
Expand Down

0 comments on commit 4d4e22d

Please sign in to comment.