Skip to content

Commit

Permalink
[test] fix t/native_pbc/number.t for windows
Browse files Browse the repository at this point in the history
windows prints 1.12589990684262e+015 and not 1.12589990684262e+15
Fixes 2/3 of #1158
  • Loading branch information
Reini Urban committed Dec 9, 2014
1 parent c1cb400 commit 01778ee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions t/native_pbc/Test.pm
Expand Up @@ -79,9 +79,14 @@ sub test_native_pbc {
$skip_msg = "$file has old PBC_COMPAT $pbc_bc_version. "
. "Need $id platform to generate it.";
}
if ($type eq 'number' and $cvt =~ /^8_16_[bl]e=>4_8_/) {
# 16 -> 8 drops some mantissa bits
$expected =~ s/1\.12589990684262e\+15/1.12589990684058e+15/;
if ($type eq 'number') {
if ($cvt =~ /^8_16_[bl]e=>4_8_/) {
# 16 -> 8 drops some mantissa bits
$expected =~ s/1\.12589990684262e\+15/1.12589990684058e+15/;
}
if ($^O eq 'MSWin32') { # windows likes to play games with the exponent
$expected =~ s/e\+15/e\+015/;
}
}
# check if skip or todo
SKIP: {
Expand Down

0 comments on commit 01778ee

Please sign in to comment.