diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-28 05:45:37 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-28 05:45:37 +0000 |
commit | 3341152da84af4c119b3f34745801f5f51a56655 (patch) | |
tree | 9ef3ebdd2c9eb476795742b7fca9167612b9b80c /test | |
parent | c4eb7b916f23d2cadb40c1409e8b1427949724f2 (diff) |
more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_float.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index c3277acfdb..9c4550e38d 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -355,6 +355,9 @@ class TestFloat < Test::Unit::TestCase assert_operator(i, :>, 0) end assert_operator(i.abs, :<=, f.abs) + d = f.abs - i.abs + assert_operator(0, :<=, d) + assert_operator(d, :<, 1) } end @@ -367,6 +370,9 @@ class TestFloat < Test::Unit::TestCase assert_operator(i, :>, 0) end assert_operator(i, :>=, f) + d = f - i + assert_operator(-1, :<, d) + assert_operator(d, :<=, 0) } end @@ -379,6 +385,9 @@ class TestFloat < Test::Unit::TestCase assert_operator(i, :>, 0) end assert_operator(i, :<=, f) + d = f - i + assert_operator(0, :<=, d) + assert_operator(d, :<, 1) } end |