mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add a test: BigDecimal("0").div(BigDecimal("Infinity")).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4bbb0f9801
commit
2f56c64b4f
1 changed files with 4 additions and 0 deletions
|
@ -668,6 +668,10 @@ class TestBigDecimal < Test::Unit::TestCase
|
|||
assert_equal(400000000000000000000000000000, x.div(3, 1))
|
||||
assert_equal(420000000000000000000000000000, x.div(3, 2))
|
||||
assert_equal(423000000000000000000000000000, x.div(3, 3))
|
||||
BigDecimal.save_exception_mode do
|
||||
BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY, false)
|
||||
assert_equal(0, BigDecimal("0").div(BigDecimal("Infinity")))
|
||||
end
|
||||
end
|
||||
|
||||
def test_abs_bigdecimal
|
||||
|
|
Loading…
Reference in a new issue