summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-02-19 21:17:38 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-02-19 21:17:38 +0000
commita63f071cf8f58e68101aa9f23a8854002538210a (patch)
tree943580e18b75c511593bc5d094a5aac70f251548
parentd26da56dac675f2c6f4847ca2fc83146f2fb3cdd (diff)
Changing tests to match new handling of empty strings
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@818 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--t/02-number-handling.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/02-number-handling.t b/t/02-number-handling.t
index 177ce438..4add3b1f 100644
--- a/t/02-number-handling.t
+++ b/t/02-number-handling.t
@@ -115,8 +115,8 @@ foreach my $format (0 .. $#formats) {
cmp_ok($form->parse_amount(\%myconfig, $expected), '==', $value,
"$expected parsed as $formats[$format][0] - $value");
- is($form->parse_amount(\%myconfig, ''), undef,
- "Empty string returns undef");
+ cmp_ok($form->parse_amount(\%myconfig, ''), '==', 0,
+ "Empty string returns 0");
cmp_ok($form->parse_amount(\%myconfig, 'foo'), 'eq',
Math::BigFloat->bnan(), "Invalid string returns NaN");
}
@@ -156,8 +156,8 @@ foreach my $format (0 .. $#formats) {
'==', $value,
"$expected parsed as $formats[$format][0] - $value");
- is($form->parse_amount(\%myconfig, ''), undef,
- "Empty string returns undef");
+ cmp_ok($form->parse_amount(\%myconfig, ''), '==', 0,
+ "Empty string returns 0");
cmp_ok($form->parse_amount(\%myconfig, 'foo'), 'eq',
Math::BigFloat->bnan(), "Invalid string returns NaN");
}