Debian Codegraph @

ext/XS-APItest/t/my_strtod.t

raw
1 #!perl -w
2 use strict;
3
4 use Test::More;
5 use Config;
6 use XS::APItest;
7
8 my ($nv, $rest);
9
10 # GH 19492 - d_strtod=undef build segfaults here
11 ($nv, $rest) = my_strtod('17.265625x');
12 # Note that .265625 is 17/64 so it can be represented exactly
13 is($nv, 17.265625, 'my_strtod("17.265625x", &e) returns 17.265625');
14 is($rest, 'x', 'my_strtod("17.265625x", &e) sets e to "x"');
15
16 done_testing();