Skip Menu |
 

This queue is for tickets about the Ogg-Vorbis-Decoder CPAN distribution.

Report information
The Basics
Id: 56823
Status: resolved
Priority: 0/
Queue: Ogg-Vorbis-Decoder

People
Owner: Nobody in particular
Requestors: dmn [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: [patch] test failures with Perl 5.12.0 -- float math
Date: Thu, 22 Apr 2010 17:05:23 +0300
To: bug-Ogg-Vorbis-Decoder [...] rt.cpan.org
From: Damyan Ivanov <dmn [...] debian.org>
Download (untitled) / with headers
text/plain 618b
Hi, Please find attached a patch fixing test failure with Perl 5.12.0 (built with -Duselongdouble). From the Debian bug report (http://bugs.debian.org/578554): # Failed test 'time_total' # at t/basic.t line 22. # got: '187.146666666666675' # expected: '187.146666666667' # Looks like you failed 1 test of 20. The patch replaces the hard-coded 187.146666666667 constant with an expression giving the same result, but using the same precision as the running Perl interpreter. Please consider integrating the patch in a future release. Thanks, dam Debian Perl Group
From: dam [...] ktnx.net
Download (untitled) / with headers
text/plain 109b
On Thu Apr 22 10:05:46 2010, dmn@debian.org wrote: Show quoted text
> Please find attached a patch ...
And here is the patch.
Subject: t_basic_relax-float-compare.patch
Description: Avoid floating point math errors when comparing test results Thing is, the test may be run on a perl built with long doubles or short doubles and the results may not match due to precision difference. Perl 5.12 is built with long doubles (5.10 is not) . The patch makes the reference number be computed with the same precision as the test result. Bug-Debian: 578554 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=56823 Author: Damyan Ivanov <dmn@debian.org> Last-Update: 2010-04-22 --- a/t/basic.t +++ b/t/basic.t @@ -19,7 +19,7 @@ ok($ogg->seekable, 'seekable'); ok($ogg->serialnumber, 'serialnumber'); is($ogg->raw_total, 4418594, 'raw_total'); ok($ogg->pcm_total, 'pcm_total'); -is($ogg->time_total, 187.146666666667, 'time_total'); +is($ogg->time_total, 187.14 + 2/300, 'time_total'); ok($ogg->raw_tell, 'raw_tell'); ok($ogg->pcm_tell, 'pcm_tell'); ok($ogg->time_tell, 'time_tell');
Thanks. 0.8 patched & pushed.


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.