Some test portability fixes again + minor changes

This commit is contained in:
Yorhel 2025-03-02 10:06:33 +01:00
parent 3fd424c6e3
commit f09a103c53
7 changed files with 33 additions and 28 deletions

View file

@ -55,7 +55,7 @@ my @tests = (
''.$$, '"'.$$.'"',
do { my $x = 12; utf8::decode($x); $x }, '"12"',
do { no warnings 'numeric'; my $x = '19a'; $x += 0; $x }, '19',
1844674407370955161 / 10, $Config{uselongdouble} ? 184467440737095516 : '1.84467440737096e+17',
$Config{uselongdouble} ? () : ( 1844674407370955161 / 10, '1.84467440737096e+17' ),
);
my @errors = (

View file

@ -97,8 +97,10 @@ num ' -0 ', 0;
num '-9223372036854775808';
num '9223372036854775807';
num '18446744073709551615';
num '-9223372036854775809', $Config{uselongdouble} ? -9.22337203685477581e+18 : -9.22337203685478e+18;
num '18446744073709551616', $Config{uselongdouble} ? 1.84467440737095516e+19 : 1.84467440737096e+19;
if (!$Config{uselongdouble}) { # Behavior of longdouble is architecture-dependent
num '-9223372036854775809', -9.22337203685478e+18;
num '18446744073709551616', 1.84467440737096e+19;
}
num '1.234';
num '1e5', 100000;
num '1e+5', 100000;