aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_math.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r--test/ruby/test_math.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb
index e547cb77ec..c17b21a53d 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -255,6 +255,10 @@ class TestMath < Test::Unit::TestCase
end
assert_raise(Math::DomainError) { Math.gamma(-Float::INFINITY) }
+ x = Math.gamma(-0.0)
+ mesg = "Math.gamma(-0.0) should be -INF"
+ assert_infinity(x, mesg)
+ assert_predicate(x, :negative?, mesg)
end
def test_lgamma