diff options
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r-- | test/ruby/test_math.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb index 64b72ce5c0..3895eec7f5 100644 --- a/test/ruby/test_math.rb +++ b/test/ruby/test_math.rb @@ -17,7 +17,10 @@ class TestMath < Test::Unit::TestCase end def test_atan2 - assert_raise(Math::DomainError) { Math.atan2(0, 0) } + check(+0.0, Math.atan2(+0.0, +0.0)) + check(-0.0, Math.atan2(-0.0, +0.0)) + check(+Math::PI, Math.atan2(+0.0, -0.0)) + check(-Math::PI, Math.atan2(-0.0, -0.0)) assert_raise(Math::DomainError) { Math.atan2(Float::INFINITY, Float::INFINITY) } assert_raise(Math::DomainError) { Math.atan2(Float::INFINITY, -Float::INFINITY) } assert_raise(Math::DomainError) { Math.atan2(-Float::INFINITY, Float::INFINITY) } |