summaryrefslogtreecommitdiff
path: root/t/02-number-handling.t
diff options
context:
space:
mode:
Diffstat (limited to 't/02-number-handling.t')
-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");
}