We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dac218 commit b6073e1Copy full SHA for b6073e1
S02-types/baggy.t
@@ -1,7 +1,7 @@
1
use v6;
2
use Test;
3
4
-plan 6;
+plan 7;
5
6
# Tests of the Baggy role
7
@@ -47,3 +47,11 @@ subtest 'Baggy:U forwards methods to Mu where appropriate' => {
47
is-deeply .elems, 1, '.elems';
48
}
49
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