Subject: | [PATCH] Test failures with perl 5.12 with long doubles (-Duselongdouble) |
Date: | Wed, 05 May 2010 19:18:12 +0900 |
To: | bug-XML-XQL [...] rt.cpan.org |
From: | Ansgar Burchardt <ansgar [...] 43-1.org> |
Hi,
as reported on the Debian bug tracker[1], one of the tests for XML::XQL
fails when using perl 5.12 with long doubles (-Duselongdouble). The
test suite should not make assumptions with what precision the
calculations are done.
Please consider to apply the attached patch in the next release. The
test suite passes with both 5.10.1 and 5.12 (both from Debian) with this
patch applied.
Regards,
Ansgar
From: Ansgar Burchardt <ansgar@43-1.org>
Date: Wed, 05 May 2010 18:43:52 +0900
Bug-Debian: http://bugs.debian.org/578897
Subject: Fix test failures when perl is compiled with long doubles
--- libxml-xql-perl.orig/t/xql_sin2.t
+++ libxml-xql-perl/t/xql_sin2.t
@@ -22,7 +22,7 @@
$^W=0;
my $data = join('',<DATA>);
#print "{{$data}}\n{{$str}}\n";
- assert_ok ($str eq $data);
+ assert_ok ($str =~ /^$data$/s);
}
#Test 2
@@ -49,15 +49,15 @@
__DATA__
<array>
<item index='0'>
- <obj type='XML::XQL::Number'>0.841470984807897</obj>
+ <obj type='XML::XQL::Number'>0\.841470984807[0-9]+</obj>
</item>
<item index='1'>
- <obj type='XML::XQL::Number'>0.909297426825682</obj>
+ <obj type='XML::XQL::Number'>0\.909297426825[0-9]+</obj>
</item>
<item index='2'>
- <obj type='XML::XQL::Number'>0.141120008059867</obj>
+ <obj type='XML::XQL::Number'>0\.141120008059[0-9]+</obj>
</item>
<item index='3'>
- <obj type='XML::XQL::Number'>-0.756802495307928</obj>
+ <obj type='XML::XQL::Number'>-0\.756802495307[0-9]+</obj>
</item>
</array>