diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-02-19 21:17:02 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-02-19 21:17:02 +0000 |
commit | 6b4bf3b692cfb045c2de6a4ac53bb28fae416892 (patch) | |
tree | 877e4b09b6d9127f2462a5ba39c4ee19cb646e22 /t | |
parent | 7fe11021b7a2495ebc70e8641de44c1e95c90b98 (diff) |
Changing tests to match new handling of empty strings
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@817 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 't')
-rw-r--r-- | t/02-number-handling.t | 8 |
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"); } |