From ff2c5c161c1cbb18923521ad15817255013fdd4a Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 5 Sep 2011 08:46:44 +0000 Subject: * test/ruby/test_float.rb (TestFloat#test_round): show the number in question. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_float.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index c244447bd7..e77b9e62e0 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -452,15 +452,16 @@ class TestFloat < Test::Unit::TestCase def test_round VS.each {|f| + msg = "round(#{f})" i = f.round if f < 0 - assert_operator(i, :<, 0) + assert_operator(i, :<, 0, msg) else - assert_operator(i, :>, 0) + assert_operator(i, :>, 0, msg) end d = f - i - assert_operator(-0.5, :<=, d) - assert_operator(d, :<=, 0.5) + assert_operator(-0.5, :<=, d, msg) + assert_operator(d, :<=, 0.5, msg) } end -- cgit v1.2.3