[svn:parrot] r42987 - trunk/t/library
dukeleto at svn.parrot.org
dukeleto at svn.parrot.org
Fri Dec 11 14:33:27 UTC 2009
Author: dukeleto
Date: Fri Dec 11 14:33:23 2009
New Revision: 42987
URL: https://trac.parrot.org/parrot/changeset/42987
Log:
[t] Tests for is() : comparing a Float PMC and a float with precision
Modified:
trunk/t/library/test_more.t
Modified: trunk/t/library/test_more.t
==============================================================================
--- trunk/t/library/test_more.t Fri Dec 11 10:51:05 2009 (r42986)
+++ trunk/t/library/test_more.t Fri Dec 11 14:33:23 2009 (r42987)
@@ -22,7 +22,7 @@
exports = split " ", "plan test_out test_diag test_fail test_pass test_test"
test_namespace.'export_to'(curr_namespace, exports)
- plan( 104 )
+ plan( 106 )
test_skip()
test_todo()
@@ -288,6 +288,19 @@
is( 666.222, 666.223, 'comparing two floats with precision, success', 1e-2)
test_test( 'passing test is() for floats with precision')
+ test_fail( 'comparing Float PMC and a float with precision, failure' )
+ $P0 = new 'Float'
+ $P0 = 888.81
+ is( $P0, 888.82, 'comparing Float PMC and a float with precision, failure', 1e-2)
+ test_diag( 'Have: 888.81' )
+ test_diag( 'Want: 888.82' )
+ test_test( 'failing test is() for comparing a Float PMC and float with precision')
+
+ test_pass( 'comparing Float PMC and a float with precision, success' )
+ $P0 = 666.222
+ is( $P0, 666.223, 'comparing Float PMC and a float with precision, success', 1e-2)
+ test_test( 'passing test is() for comparing Float PMC and float with precision')
+
test_pass()
is( 'bob', 'bob' )
test_test( 'passing test is() for strings')
More information about the parrot-commits
mailing list