summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-06 19:16:07 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-06 19:16:07 +0000
commitfe037183dc1902663297ced40bebb107e6653a1c (patch)
treedcc9c20c288c1d3d58a9299ca42afbfcb40900f1 /t
parent695a98a085e0e71aa19ad8683933b54c4c75dc7b (diff)
Fixing rounding tests
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1135 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 't')
-rw-r--r--t/02-number-handling.t2
1 files changed, 2 insertions, 0 deletions
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");
}