зеркало из https://github.com/github/ruby.git
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:
Родитель
4bbb0f9801
Коммит
2f56c64b4f
|
@ -668,6 +668,10 @@ class TestBigDecimal < Test::Unit::TestCase
|
||||||
assert_equal(400000000000000000000000000000, x.div(3, 1))
|
assert_equal(400000000000000000000000000000, x.div(3, 1))
|
||||||
assert_equal(420000000000000000000000000000, x.div(3, 2))
|
assert_equal(420000000000000000000000000000, x.div(3, 2))
|
||||||
assert_equal(423000000000000000000000000000, x.div(3, 3))
|
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
|
end
|
||||||
|
|
||||||
def test_abs_bigdecimal
|
def test_abs_bigdecimal
|
||||||
|
|
Загрузка…
Ссылка в новой задаче