diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-05 08:46:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-05 08:46:44 +0000 |
commit | ff2c5c161c1cbb18923521ad15817255013fdd4a (patch) | |
tree | 9bd0ca96ace1d86dd9cb7de584b660d749c3e257 | |
parent | 522c16e84cff784ad631d83e8db8075ba16667a1 (diff) |
* 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
-rw-r--r-- | test/ruby/test_float.rb | 9 |
1 files changed, 5 insertions, 4 deletions
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 |