On Fri, Jan 06, 2006 at 06:05:51PM +0000, Tim Bunce wrote:
> On Fri, Jan 06, 2006 at 09:07:42AM -0800, Gerald Gallagher wrote:
> > Trying to compile DBI 1.50 on Solaris 8 using Sun WorkShop 6.  The 
> > "40profile" test fails because dbi_profile_merge is returning way too many 
> > decimal places.  Can I assume that this is due to my Perl 5.8.4 compiled 
> > with USE_LONG_DOUBLE ?  I don't have the option to recompile Perl...  
> > Anyone have suggestions?
> 
> You can ignore the 'failure'. The test need to be reworked to be less 
> sensitive to this issue.

Gerald, can you try the appended change for me?

Tim.

---snip---
Index: t/40profile.t
===================================================================
--- t/40profile.t       (revision 2308)
+++ t/40profile.t       (working copy)
@@ -199,7 +199,8 @@
     [ 10, 0.51, 0.11, 0.01, 0.22, 1023110000, 1023110010 ],
     [ 15, 0.42, 0.12, 0.02, 0.23, 1023110005, 1023110009 ],
 );        
-ok("@$totals", "25 0.93 0.11 0.01 0.23 1023110000 1023110010");
+$_ = sprintf "%.2f", $_ for @$totals; # avoid precision issues
+ok("@$totals", "25.00 0.93 0.11 0.01 0.23 1023110000.00 1023110010.00");
 ok($total_time, 0.93);
 
 $total_time = dbi_profile_merge(
@@ -208,7 +209,8 @@
         bar => [ 17, 1.42, 0.12, 0.02, 0.23, 1023110005, 1023110009 ],
     }
 );        
-ok("@$totals", "27 2.93 0.11 0.01 0.23 1023110000 1023110010");
+$_ = sprintf "%.2f", $_ for @$totals; # avoid precision issues
+ok("@$totals", "27.00 2.93 0.11 0.01 0.23 1023110000.00 1023110010.00");
 ok($total_time, 2.93);
 
 # check that output went into the log file
---snip---

Reply via email to