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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb
index c17b21a53d..1d571252ee 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -275,6 +275,11 @@ class TestMath < Test::Unit::TestCase
assert_float_and_int([Math.log(6), 1], Math.lgamma(4))
assert_raise(Math::DomainError) { Math.lgamma(-Float::INFINITY) }
+ x, sign = Math.lgamma(-0.0)
+ mesg = "Math.lgamma(-0.0) should be [INF, -1]"
+ assert_infinity(x, mesg)
+ assert_predicate(x, :positive?, mesg)
+ assert_equal(-1, sign, mesg)
end
def test_fixnum_to_f