summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-12 08:20:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-12 08:20:39 +0000
commit89a3450a5521922f1093307001c32b3bd5defc00 (patch)
tree53150594e3c37963f9854a8fb639bf31d226cb5e /test
parent9bd672f6682aef683c49f0b8da2b439e4d4103ac (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/bigdecimal/test_bigmath.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/bigdecimal/test_bigmath.rb b/test/bigdecimal/test_bigmath.rb
index e48b6c540f..88c2e2e120 100644
--- a/test/bigdecimal/test_bigmath.rb
+++ b/test/bigdecimal/test_bigmath.rb
@@ -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