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

SF.net SVN: ledger-smb: [817] branches/1.2/t/02-number-handling.t



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

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

Modified Paths:
--------------
    branches/1.2/t/02-number-handling.t

Modified: branches/1.2/t/02-number-handling.t
===================================================================
--- branches/1.2/t/02-number-handling.t	2007-02-18 19:46:07 UTC (rev 816)
+++ branches/1.2/t/02-number-handling.t	2007-02-19 21:17:02 UTC (rev 817)
@@ -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.