[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [818] trunk/t/02-number-handling.t



Revision: 818
          http://svn.sourceforge.net/ledger-smb/?rev=818&view=rev
Author:   einhverfr
Date:     2007-02-19 13:17:38 -0800 (Mon, 19 Feb 2007)

Log Message:
-----------
Changing tests to match new handling of empty strings

Modified Paths:
--------------
    trunk/t/02-number-handling.t

Modified: trunk/t/02-number-handling.t
===================================================================
--- trunk/t/02-number-handling.t	2007-02-19 21:17:02 UTC (rev 817)
+++ trunk/t/02-number-handling.t	2007-02-19 21:17:38 UTC (rev 818)
@@ -115,8 +115,8 @@
 	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 @@
 		'==',  $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");
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.