mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_bigmath.rb: ignore on unrelated platforms
* test/bigdecimal/test_bigmath.rb (test_log): ignore the result of log which is not a finite number. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9bd672f668
commit
89a3450a55
1 changed files with 8 additions and 1 deletions
|
@ -68,7 +68,14 @@ class TestBigMath < Test::Unit::TestCase
|
|||
assert_raise(Math::DomainError) {BigMath.log(BigDecimal("0"), 10)}
|
||||
assert_raise(Math::DomainError) {BigMath.log(BigDecimal("-1"), 10)}
|
||||
assert_separately(%w[-rbigdecimal], <<-SRC)
|
||||
assert_in_epsilon(Math.log(10)*19999999999999, BigMath.log(BigDecimal("1E19999999999999"), 10))
|
||||
begin
|
||||
x = BigMath.log(BigDecimal("1E19999999999999"), 10)
|
||||
rescue FloatDomainError
|
||||
else
|
||||
unless x.infinite?
|
||||
assert_in_epsilon(Math.log(10)*19999999999999, x)
|
||||
end
|
||||
end
|
||||
SRC
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue