Skip Menu |
 

This queue is for tickets about the YAML-Syck CPAN distribution.

Report information
The Basics
Id: 22391
Status: resolved
Priority: 0/
Queue: YAML-Syck

People
Owner: TODDR [...] cpan.org
Requestors: FANY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.71
Fixed in: 1.10_01



Subject: t/json-basic fails due to rounding errors
t/json-basic...........NOK 5/42 # Failed test 'roundtrip 2.1 -> '2.10000000000000009' -> 2.10000000000000009' # in t/json-basic.t at line 62. # got: '2.10000000000000009'# expected: '2.1' t/json-basic...........NOK 8/42 # Failed test 'roundtrip [1.1,2.2,3.3] -> ['1.10000000000000009','2.20000000000000018','3.29999999999999982'] -> [1.10000000000000009,2.20000000000000018,3.29999999999999982]' # in t/json-basic.t at line 62. # got: '[1.10000000000000009,2.20000000000000018,3.29999999999999982]' # expected: '[1.1,2.2,3.3]' t/json-basic...........NOK 9/42 # Failed test 'roundtrip [1.1,2.2,3.3] -> ['1.10000000000000009','2.20000000000000018','3.29999999999999982'] -> [1.10000000000000009,2.20000000000000018,3.29999999999999982]' # in t/json-basic.t at line 62. # got: '[1.10000000000000009,2.20000000000000018,3.29999999999999982]' # expected: '[1.1,2.2,3.3]' t/json-basic...........NOK 26/42 # Failed test 'roundtrip 2.1 -> '2.10000000000000009' -> 2.10000000000000009' # in t/json-basic.t at line 62. # got: '2.10000000000000009' # expected: '2.1' t/json-basic...........NOK 29/42 # Failed test 'roundtrip [1.1,2.2,3.3] -> ['1.10000000000000009','2.20000000000000018','3.29999999999999982'] -> [1.10000000000000009,2.20000000000000018,3.29999999999999982]' # in t/json-basic.t at line 62. # got: '[1.10000000000000009,2.20000000000000018,3.29999999999999982]' # expected: '[1.1,2.2,3.3]' t/json-basic...........NOK 30/42 # Failed test 'roundtrip [1.1,2.2,3.3] -> ['1.10000000000000009','2.20000000000000018','3.29999999999999982'] -> [1.10000000000000009,2.20000000000000018,3.29999999999999982]' # in t/json-basic.t at line 62. # got: '[1.10000000000000009,2.20000000000000018,3.29999999999999982]' # expected: '[1.1,2.2,3.3]' # Looks like you failed 6 tests of 42. t/json-basic...........dubious Test returned status 6 (wstat 1536, 0x600) DIED. FAILED tests 5, 8-9, 26, 29-30 Failed 6/42 tests, 85.71% okay I guess the problem is due to me using a Perl interpreter with 64 bit integers and/or long doubles: fany@bigblue:~> perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.13-15.7-default, archname=i686-linux-64int-ld uname='linux bigblue 2.6.13-15.7-default #1 tue nov 29 14:32:29 utc 2005 i686 i686 i386 gnulinux ' config_args='-e' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -march=pentium4', cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include' ccversion='', gccversion='4.0.2 20050901 (prerelease) (SUSE Linux)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.5.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_64_BIT_INT USE_LARGE_FILES USE_LONG_DOUBLE USE_PERLIO
Yuck.... This is going to take a while... =(
Download (untitled) / with headers
text/plain 1.1k
On Sat Oct 21 08:49:14 2006, NUFFIN wrote: Show quoted text
> Yuck.... This is going to take a while... =(
(This is a form-reply that isn't specific to your particular report) YAML::Syck has just acquired one new maintainer (me), it still doesn't have anyone that *cares* about it. But I'm willing to help solve your report & release a new version with the fix if it's easy for me. It now has a Git repository at: http://github.com/avar/YAML-Syck If your report is a patch that fixes a problem, great. Please remake the patch against Git by forking that repo and sending me a pull request on GitHub (or an update to this bug if you prefer git-format-patch(1) or some other repo provider..). Make sure to include a test for what you fixed. If your report is some code that fails (and you have a testcase for it) a patch against the test suite to demonstrate that failure would be very useful. It's OK if the test crashes and burns, see Test::More's docs for how to make TODO tests that fail now, but shouldn't. Even if it segfaults perl C<system $^X => qw/ -Mblib -MYAML::Syck .../> or something like that and checking the return value will do.
Download (untitled) / with headers
text/plain 160b
I believe this is resolved in the dev version of 1.10_02 due to the change in how we handle floats. Please re-open this ticket if you find this not to be true.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.