Skip to content

Commit b6073e1

Browse files
committed
1 parent 2dac218 commit b6073e1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

S02-types/baggy.t

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

4-
plan 6;
4+
plan 7;
55

66
# Tests of the Baggy role
77

@@ -47,3 +47,11 @@ subtest 'Baggy:U forwards methods to Mu where appropriate' => {
4747
is-deeply .elems, 1, '.elems';
4848
}
4949
}
50+
51+
# https://rt.perl.org/Ticket/Display.html?id=131270
52+
subtest '.pick/.roll/.grab reject NaN count' => {
53+
plan 3;
54+
throws-like { ^5 .BagHash.pick: NaN }, X::Invalid::ComputedValue, '.pick';
55+
throws-like { ^5 .BagHash.roll: NaN }, X::Invalid::ComputedValue, '.roll';
56+
throws-like { ^5 .BagHash.grab: NaN }, X::Invalid::ComputedValue, '.grab';
57+
}

0 commit comments

Comments
 (0)