Skip to content

Commit c824a98

Browse files
committed
Add tests for RT #127144, Juerd++
1 parent 1417783 commit c824a98

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

S02-types/native.t

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

4-
plan 83;
4+
plan 87;
55

66
{
77
my int $x;
@@ -316,4 +316,24 @@ dies-ok { EVAL 'my str $x = Str;' }, '"my str $x = Str" dies';
316316
ok $u8 >= 0, 'cannot make a uint8 go negative by overflowing it';
317317
}
318318

319+
# RT #127144, uint increment in sink context
320+
{
321+
sub d { "++ on uint$^n overflows to 0 in sink context" }
322+
my uint8 $uint8 = 0xff;
323+
$uint8++;
324+
#?rakudo todo "uint8 increment in sink context doesn't work"
325+
is($uint8, 0, d 8);
326+
my uint16 $uint16 = 0xffff;
327+
$uint16++;
328+
#?rakudo todo "uint16 increment in sink context doesn't work"
329+
is($uint16, 0, d 16);
330+
my uint32 $uint32 = 0xffffffff;
331+
$uint32++;
332+
#?rakudo todo "uint32 increment in sink context doesn't work"
333+
is($uint32, 0, d 32);
334+
my uint64 $uint64 = 0xffffffffffffffff;
335+
$uint64++;
336+
is($uint64, 0, d 64);
337+
}
338+
319339
# vim: ft=perl6

0 commit comments

Comments
 (0)