Skip to content

Commit

Permalink
Test overflow in .roll()
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Dec 11, 2017
1 parent a563544 commit 1b0be0f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions t/05-messages/11-overflow.t
@@ -0,0 +1,23 @@
use lib <t/packages/>;
use Test;
use Test::Helpers;

# This file contains tests for behaviour on overflow in various routines

plan 1;

# RT #125820
subtest '.roll' => {
plan 3;

throws-like { <a b c d e>.roll(-9999999999999999999999999999999999999999999999999).perl },
Exception, :message{ .contains: <unbox native>.all }, '(1)';

throws-like { <a b c d e>.roll(-99999999999999999999999999999999999999999999999999999999999999999).perl },
Exception, :message{ .contains: <unbox native>.all }, '(2)';

throws-like { <a b c d e>.roll(99999999999999999999999999999999999999999999999999999999999999999).perl },
Exception, :message{ .contains: <unbox native>.all }, '(3)';
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 1b0be0f

Please sign in to comment.