From 49cfee93420a50d15cd0168a92742bee61bc43e1 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sun, 6 May 2007 19:16:51 +0000 Subject: Fixing rounding tests git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1136 4979c152-3d1c-0410-bac9-87ea11338e46 --- t/02-number-handling.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/02-number-handling.t b/t/02-number-handling.t index 4add3b1f..5b694b1d 100644 --- a/t/02-number-handling.t +++ b/t/02-number-handling.t @@ -19,11 +19,13 @@ foreach my $value ('0.01', '0.05', '0.015', '0.025', '1.1', '1.5', '1.9', foreach my $places ('3', '2', '1', '0') { Math::BigFloat->round_mode('+inf'); $expected = Math::BigFloat->new($value)->ffround(-$places); + $expected->precision(undef); is($form->round_amount($value, $places), $expected, "$value to $places decimal places - $expected"); Math::BigFloat->round_mode('-inf'); $expected = Math::BigFloat->new(-$value)->ffround(-$places); + $expected->precision(undef); is($form->round_amount(-$value, $places), $expected, "-$value to $places decimal places - $expected"); } -- cgit v1.2.3