Skip to content

Commit dde8f1f

Browse files
committed
Adapt coerce_is/coerce_si tests for 32bit backends
1 parent 77eb875 commit dde8f1f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

t/nqp/081-radix.t

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
plan(32*3*2 + 3 + 5);
1+
plan(32*3*2 + 3 + 7);
22

33
sub test_radix($radix,$str,$pos,$flags,$value,$mult,$offset,$desc) {
44
my $result := nqp::radix($radix,$str,$pos,$flags);
@@ -81,7 +81,16 @@ test_radix_both(10,'⁰',0,0, 0,1,-1, 'unsupported by radix');
8181

8282
# Putting the number in nqp doesn't work since it may store it as a num in between
8383
# so use coerce_si to test coerce_is
84-
my @strings := ('9223372036854775807', '0', '-1', '1', '-9223372036854775808');
84+
my @strings := ('92233', '0', '-1', '1', '-92233');
85+
86+
if nqp::backendconfig(){"intvalsize"} < 8 {
87+
skip("skipping coerce_is/coerce_si test with 64bit int on a 32bit backend", 2);
88+
}
89+
else {
90+
nqp::unshift(@strings, '9223372036854775807');
91+
nqp::push(@strings, '-9223372036854775808');
92+
}
93+
8594
for @strings {
8695
is(nqp::coerce_is(nqp::coerce_si($_)), $_, "coerce_si and coerce_is round trip '$_'");
8796
}

0 commit comments

Comments
 (0)